This commit is contained in:
zoey 2025-05-28 19:10:50 -04:00
parent 99745a7f02
commit 7972325396
Signed by: zoey
GPG key ID: 81FB9FECDD6A33E2
17 changed files with 839 additions and 869 deletions

View file

@ -0,0 +1,32 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.wallpaper;
mkService = recursiveUpdate {
Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target"];
};
in {
options.services.wallpaper = with types; {
enable = mkBoolOpt false "Enable MPD (Music Player Daemon)";
};
config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
systemd.user.services = {
swaybg = mkService {
Unit.Description = "Wallpaper Chooser";
Service = {
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
Restart = "always";
};
};
};
};
}