Add xautolock

This commit is contained in:
Dave Gallant
2022-05-29 22:51:17 -04:00
parent d2f1a45948
commit 3c9b189021
4 changed files with 26 additions and 14 deletions

View File

@@ -2,24 +2,15 @@
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager = { displayManager = {
startx.enable = true;
/*
gdm = {
*/
/*
enable = true;
*/
/*
wayland = false;
*/
/*
};
*/
lightdm = { lightdm = {
enable = true; enable = true;
}; };
}; };
desktopManager.gnome.enable = true; desktopManager = {
gnome = {
enable = true;
};
};
}; };
services.logrotate.checkConfig = false; services.logrotate.checkConfig = false;

View File

@@ -182,6 +182,7 @@ in {
gnomeExtensions.appindicator gnomeExtensions.appindicator
google-chrome google-chrome
guake guake
i3lock-fancy-rapid
kazam kazam
keyleds keyleds
linuxPackages.perf linuxPackages.perf
@@ -206,6 +207,7 @@ in {
virtmanager virtmanager
vlc vlc
wireshark-qt wireshark-qt
xautolock
yaru-theme yaru-theme
zoom-us zoom-us
]; ];

View File

@@ -39,6 +39,7 @@
./services/netdata/default.nix ./services/netdata/default.nix
./services/keyleds/default.nix ./services/keyleds/default.nix
./services/xautolock/default.nix
({ ({
config, config,

View 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";
};
};
}