mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
Add xautolock
This commit is contained in:
18
services/xautolock/default.nix
Normal file
18
services/xautolock/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user