home-manager/modules/services/xscreensaver.nix
Robert Helgesson fbff38de33
xscreensaver: install the xscreensaver package
This is needed to make the xscreensaver tools available.
2018-03-01 23:21:45 +01:00

35 lines
764 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.rycee ];
options = {
services.xscreensaver = {
enable = mkEnableOption "XScreenSaver";
};
};
config = mkIf config.services.xscreensaver.enable {
# To make the xscreensaver-command tool available.
home.packages = [ pkgs.xscreensaver ];
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" ];
};
};
};
}