diff --git a/Droidnix/README.org b/Droidnix/README.org index ae2f4632f..a7a45dc7e 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -681,25 +681,28 @@ You can edit assets/hyprland/wallpaperstuff/wallpaper.toml to change settings Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings. #+BEGIN_SRC nix :tangle generated/out-of-tree/core/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html { config, pkgs, lib, flakeRoot, ... }: + let - userConfPath = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.toml"; + # Pad naar de wallpaper config in de flake + wallpaperConf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.toml"; in { + # Installeer wpaperd voor de gebruiker home.packages = [ pkgs.wpaperd ]; + + # Plaats wallpaper.toml automatisch in $HOME/.config/wpaperd + home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf; + + # Systemd user service systemd.user.services.wpaperd = { - Unit = { - Description = "wpaperd wallpaper daemon"; - After = [ "default.target" ]; - }; - Service = { + description = "wpaperd wallpaper daemon"; + wantedBy = [ "default.target" ]; + serviceConfig = { Type = "simple"; - ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${userConfPath}"; + ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${config.home.homeDirectory}/.config/wpaperd/wallpaper.toml"; Restart = "on-failure"; RestartSec = 1; }; - Install = { - WantedBy = [ "default.target" ]; - }; }; } #+END_SRC diff --git a/Droidnix/generated/out-of-tree/core/rotating_wallpaper.nix b/Droidnix/generated/out-of-tree/core/rotating_wallpaper.nix index bad732a12..0929b45af 100644 --- a/Droidnix/generated/out-of-tree/core/rotating_wallpaper.nix +++ b/Droidnix/generated/out-of-tree/core/rotating_wallpaper.nix @@ -1,22 +1,25 @@ { config, pkgs, lib, flakeRoot, ... }: + let - userConfPath = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.toml"; + # Pad naar de wallpaper config in de flake + wallpaperConf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.toml"; in { + # Installeer wpaperd voor de gebruiker home.packages = [ pkgs.wpaperd ]; + + # Plaats wallpaper.toml automatisch in $HOME/.config/wpaperd + home.file.".config/wpaperd/wallpaper.toml".source = wallpaperConf; + + # Systemd user service systemd.user.services.wpaperd = { - Unit = { - Description = "wpaperd wallpaper daemon"; - After = [ "default.target" ]; - }; - Service = { + description = "wpaperd wallpaper daemon"; + wantedBy = [ "default.target" ]; + serviceConfig = { Type = "simple"; - ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${userConfPath}"; + ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${config.home.homeDirectory}/.config/wpaperd/wallpaper.toml"; Restart = "on-failure"; RestartSec = 1; }; - Install = { - WantedBy = [ "default.target" ]; - }; }; }