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