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:
parent
6b87f2846d
commit
380a878c27
1 changed files with 10 additions and 3 deletions
|
@ -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" ]; };
|
||||||
|
|
Loading…
Reference in a new issue