mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 00:58:16 +00:00
19 lines
388 B
Nix
19 lines
388 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
in {
|
|
systemd.services.xautolock = {
|
|
description = "Lock the screen automatically after a timeout";
|
|
wantedBy = ["graphical.target"];
|
|
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
User = "dave";
|
|
Environment = "DISPLAY=:0";
|
|
ExecStart = "${pkgs.xautolock}/bin/xautolock -time 1 -detectsleep -locker /home/dave/lock";
|
|
};
|
|
};
|
|
}
|