2017-01-07 18:16:26 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-09-26 21:40:31 +00:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 18:16:26 +00:00
|
|
|
options = {
|
|
|
|
services.xscreensaver = {
|
|
|
|
enable = mkEnableOption "XScreenSaver";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.xscreensaver.enable {
|
2018-03-01 22:21:45 +00:00
|
|
|
# To make the xscreensaver-command tool available.
|
|
|
|
home.packages = [ pkgs.xscreensaver ];
|
|
|
|
|
2017-01-07 18:16:26 +00:00
|
|
|
systemd.user.services.xscreensaver = {
|
|
|
|
Unit = {
|
|
|
|
Description = "XScreenSaver";
|
2017-06-26 16:34:09 +00:00
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${pkgs.xscreensaver}/bin/xscreensaver -no-splash";
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = {
|
2017-01-09 21:45:42 +00:00
|
|
|
WantedBy = [ "graphical-session.target" ];
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|