{ lib, ... }: { flake.nixosModules.rotating-wallpaper = { config, pkgs, lib, ... }: let wallpaperConf = ../../../assets/hyprland/wallpaperstuff/wallpaper.toml; in { options.mySystem.desktop.wallpaper.enable = lib.mkEnableOption "Enable rotating wallpaper via wpaperd"; config = lib.mkIf (config.mySystem.desktop.wallpaper.enable or false) { # Home Manager context home-manager.users.henrov = { home.packages = [ pkgs.wpaperd ]; home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf; systemd.user.services.wpaperd = { description = "wpaperd wallpaper daemon"; wantedBy = [ "default.target" ]; serviceConfig = { Type = "simple"; ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ~/.config/wpaperd/wallpaper.toml"; Restart = "on-failure"; RestartSec = 1; }; }; }; }; }; }