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 = {
enable = true;
displayManager = {
startx.enable = true;
/*
gdm = {
*/
/*
enable = true;
*/
/*
wayland = false;
*/
/*
};
*/
lightdm = {
enable = true;
};
};
desktopManager.gnome.enable = true;
desktopManager = {
gnome = {
enable = true;
};
};
};
services.logrotate.checkConfig = false;

View File

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

View File

@@ -39,6 +39,7 @@
./services/netdata/default.nix
./services/keyleds/default.nix
./services/xautolock/default.nix
({
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";
};
};
}