diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2024-05-23 13:56:00 +0300 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-30 12:29:57 +0200 |
| commit | 08297376a85a1719518507e54fca9de954d2376a (patch) | |
| tree | 3b9c58304b40248533bbb2bb5b7bad2da9da1ff0 /roles/wallpaper.nix | |
| parent | 75c2af4aedd2ac5c2cfc74b346625fa4b265541d (diff) | |
| download | nixos-08297376a85a1719518507e54fca9de954d2376a.tar.zst | |
Agenix configuration
Diffstat (limited to 'roles/wallpaper.nix')
| -rw-r--r-- | roles/wallpaper.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/roles/wallpaper.nix b/roles/wallpaper.nix new file mode 100644 index 0000000..3cc4f91 --- /dev/null +++ b/roles/wallpaper.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + systemd.user.services.wallpaper = { + description = "wallpaper"; + script = '' + ${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ,$(find -L /etc/nixos/home/wallpapers -type f | shuf -n 1) + ''; + serviceConfig = { + Type = "oneshot"; + }; + }; + + systemd.user.timers.wallpaper = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "10m"; + OnUnitActiveSec = "10m"; + Unit = "wallpaper.service"; + Persistent = true; + }; + }; +} |
