home-manager/modules/services/xscreensaver.nix

35 lines
764 B
Nix
Raw Normal View History

2017-01-07 19:16:26 +01:00
{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.rycee ];
2017-01-07 19:16:26 +01:00
options = {
services.xscreensaver = {
enable = mkEnableOption "XScreenSaver";
};
};
config = mkIf config.services.xscreensaver.enable {
# 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";
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 = {
WantedBy = [ "graphical-session.target" ];
2017-01-07 19:16:26 +01:00
};
};
};
}