1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-26 03:39:47 +01:00

xscreensaver: add package option

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina E. Sørensen 2024-02-24 21:34:39 +01:00 committed by Mikilio
parent 6b87f2846d
commit 380a878c27
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -25,6 +25,13 @@ in {
The settings to use for XScreenSaver. The settings to use for XScreenSaver.
''; '';
}; };
package = mkOption {
type = with types; package;
default = pkgs.xscreensaver;
defaultText = lib.literalExpression "pkgs.xscreensaver";
description = "Which xscreensaver package to use.";
};
}; };
}; };
@ -35,7 +42,7 @@ in {
]; ];
# To make the xscreensaver-command tool available. # To make the xscreensaver-command tool available.
home.packages = [ pkgs.xscreensaver ]; home.packages = [ cfg.package ];
xresources.properties = xresources.properties =
mapAttrs' (n: nameValuePair "xscreensaver.${n}") cfg.settings; mapAttrs' (n: nameValuePair "xscreensaver.${n}") cfg.settings;
@ -52,8 +59,8 @@ in {
}; };
Service = { Service = {
ExecStart = "${pkgs.xscreensaver}/bin/xscreensaver -no-splash"; ExecStart = "${cfg.package}/bin/xscreensaver -no-splash";
Environment = "PATH=${makeBinPath [ pkgs.xscreensaver ]}"; Environment = "PATH=${makeBinPath [ cfg.package ]}";
}; };
Install = { WantedBy = [ "graphical-session.target" ]; }; Install = { WantedBy = [ "graphical-session.target" ]; };