diff options
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 |