home-manager/modules/services/xscreensaver.nix
2017-09-26 23:40:31 +02:00

32 lines
665 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.rycee ];
options = {
services.xscreensaver = {
enable = mkEnableOption "XScreenSaver";
};
};
config = mkIf config.services.xscreensaver.enable {
systemd.user.services.xscreensaver = {
Unit = {
Description = "XScreenSaver";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.xscreensaver}/bin/xscreensaver -no-splash";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}