1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

swww: add extraArgs for swww-daemon

This commit is contained in:
Lin Xianyi 2025-08-11 18:54:27 +08:00 committed by Austin Horstman
parent e11d6c321f
commit 627a3932b9
3 changed files with 21 additions and 2 deletions

View file

@ -13,6 +13,20 @@ in
options.services.swww = {
enable = lib.mkEnableOption "swww, a Solution to your Wayland Wallpaper Woes";
package = lib.mkPackageOption pkgs "swww" { };
extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [
"--no-cache"
"--layer"
"bottom"
];
description = ''
Options given to swww-daemon when the service is run.
See `swww-daemon --help` for more information.
'';
};
};
config = lib.mkIf cfg.enable {
@ -35,7 +49,7 @@ in
};
Service = {
ExecStart = "${lib.getExe' cfg.package "swww-daemon"}";
ExecStart = "${lib.getExe' cfg.package "swww-daemon"} ${lib.escapeShellArgs cfg.extraArgs}";
Restart = "always";
RestartSec = 10;
};

View file

@ -3,6 +3,11 @@
services.swww = {
enable = true;
package = config.lib.test.mkStubPackage { outPath = "@swww@"; };
extraArgs = [
"--no-cache"
"--layer"
"bottom"
];
};
nmt.script = ''

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@swww@/bin/swww-daemon
ExecStart=@swww@/bin/swww-daemon --no-cache --layer bottom
Restart=always
RestartSec=10