Files
nixos/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix
T
2026-03-17 20:47:33 +00:00

39 lines
1.0 KiB
Nix

{ config, pkgs, lib, flakeRoot, ... }:
let
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "${config.home.homeDirectory}/.config/wpaperd";
in
{
# Install wpaperd system-wide
environment.systemPackages = with pkgs; [ wpaperd ];
# Activation script: copy wallpapers & config to ~/.config/wpaperd
system.activationScripts.copyWpaperdConfig = {
text = ''
echo "=== Copying wpaperd config to ${wallpaperTarget} ==="
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
chmod -R 755 "${wallpaperTarget}"
echo "Done."
'';
deps = [];
};
# User systemd service (runs on login)
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
wantedBy = [ "default.target" ];
after = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
};
enable = true;
};
}