Files
nixos/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix
T
2026-03-17 21:21:35 +00:00

44 lines
1.0 KiB
Nix

{
config,
pkgs,
lib,
flakeRoot,
...
}:
let
user = "henrov"; # your username
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "/home/${user}/.config/wpaperd";
in
{
environment.systemPackages = with pkgs; [ wpaperd ];
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
# Will run after graphical login
after = [ "graphical.target" ];
serviceConfig = {
Type = "simple";
# Copy config before starting
ExecStartPre = ''
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
rsync -av --no-group --no-owner "${wallpaperSource}/" "/home/${user}/Droidnix/"
'';
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
User = "${user}"; # Run as your user
WorkingDirectory = "/home/${user}";
};
wantedBy = [ "default.target" ];
enable = true;
};
}