diff options
author | Jakub Trzeciak <jptrzy@gmail.com> | 2023-09-12 12:05:21 +0200 |
---|---|---|
committer | Jakub Trzeciak <jptrzy@gmail.com> | 2023-09-12 12:05:21 +0200 |
commit | d59110695ea72e086d534c9e2b7cf54a3ea07002 (patch) | |
tree | d4a34294883fe39d1a7ee928a55a484b3cf8f8d3 /configuration.nix | |
parent | afa8c3fba5ace65bee7a02024a136986341ad129 (diff) | |
download | nixos-d59110695ea72e086d534c9e2b7cf54a3ea07002.tar.gz nixos-d59110695ea72e086d534c9e2b7cf54a3ea07002.tar.bz2 nixos-d59110695ea72e086d534c9e2b7cf54a3ea07002.zip |
Slock
Diffstat (limited to 'configuration.nix')
-rw-r--r-- | configuration.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix index 2312f0a..df11316 100644 --- a/configuration.nix +++ b/configuration.nix @@ -140,6 +140,10 @@ in { }; services = { + logind.extraConfig = '' + HandleLidSwitch=suspend + ''; + xserver = { # Enable the X11 windowing system. enable = true; @@ -183,6 +187,27 @@ in { dbus.enable = true; }; +# Lock on lid close + #systemd.user.services.systemd-lock-handler = { + # enable = true; + #}; + + #systemd.services.xautolock-lid-close = { + # enable = true; + # description = "Enable xautolock on lid close"; + + # before = [ "sleep.target" ]; + # wantedBy = [ "sleep.target" ]; + + # serviceConfig = { + # Type = "forking"; + # User = "root"; + # Environment = "DISPLAY=:1"; + # ExecStartPre = "${pkgs.xorg.xhost}/bin/xhost si:localuser:root"; + # ExecStart = "${pkgs.xautolock}/bin/xautolock --locknow"; + # }; + #}; + # Services # PinEntry for GnuPG @@ -296,6 +321,7 @@ in { arandr monero-gui sent + xautolock # Gnome Apps without Gnome gnome.adwaita-icon-theme libsecret gnome.seahorse |