diff --git a/modules/rice/sway/default.nix b/modules/rice/sway/default.nix index 42aff34..2325ac3 100644 --- a/modules/rice/sway/default.nix +++ b/modules/rice/sway/default.nix @@ -1,4 +1,15 @@ { + pkgs, + lib, + theme, + ... +}: let + mkService = lib.recursiveUpdate { + Unit.PartOf = ["graphical-session.target"]; + Unit.After = ["graphical-session.target"]; + Install.WantedBy = ["graphical-session.target"]; + }; +in { wayland.windowManager.sway = { enable = true; # package = pkgs.swayfx; @@ -29,4 +40,14 @@ }; extraOptions = ["--unsupported-gpu"]; }; + + systemd.user.services = { + swaybg = mkService { + Unit.Description = "Wallpaper chooser"; + Service = { + ExecStart = "${lib.getExe pkgs.swaybg} -i ${theme.wallpaper}"; + Restart = "always"; + }; + }; + }; }