mirror of
https://github.com/nix-community/home-manager
synced 2024-12-18 07:49:48 +01:00
xscreensaver: add package option
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
parent
ae7a3b5137
commit
4ee704cb13
1 changed files with 10 additions and 3 deletions
|
@ -25,6 +25,13 @@ in {
|
|||
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.
|
||||
home.packages = [ pkgs.xscreensaver ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xresources.properties =
|
||||
mapAttrs' (n: nameValuePair "xscreensaver.${n}") cfg.settings;
|
||||
|
@ -52,8 +59,8 @@ in {
|
|||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.xscreensaver}/bin/xscreensaver -no-splash";
|
||||
Environment = "PATH=${makeBinPath [ pkgs.xscreensaver ]}";
|
||||
ExecStart = "${cfg.package}/bin/xscreensaver -no-splash";
|
||||
Environment = "PATH=${makeBinPath [ cfg.package ]}";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
|
Loading…
Reference in a new issue