fixes
This commit is contained in:
parent
99745a7f02
commit
7972325396
17 changed files with 839 additions and 869 deletions
32
modules/home/services/wallpaper/default.nix
Normal file
32
modules/home/services/wallpaper/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue