mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
fbff38de33
This is needed to make the xscreensaver tools available.
34 lines
764 B
Nix
34 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" ];
|
|
};
|
|
};
|
|
};
|
|
}
|