mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 18:59: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.
|
||||
'';
|
||||
};
|
||||
|
||||
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