diff --git a/configuration.nix b/configuration.nix index 1903b97..43be9e3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -215,6 +215,21 @@ # List services that you want to enable: + # Suspend on laptop lid close + services.logind = { + enable = true; + logindConfig = { + HandleLidSwitch = "suspend"; + HandleLidSwitchExternalPower = "suspend"; + HandleLidSwitchDocked = "suspend"; + LidSwitchIgnoreInhibited = "no"; + }; + }; + + powerManagement = { + enable = true; + }; + # Enable the OpenSSH daemon. services.openssh.enable = true; services.tailscale.enable = true; diff --git a/hosts/x.nix b/hosts/x.nix index 5702241..f24d127 100644 --- a/hosts/x.nix +++ b/hosts/x.nix @@ -78,4 +78,10 @@ printf '[User]\nSession=niri\nXSession=niri\n' > /var/lib/AccountsService/users/jgarr fi ''; + + services.displayManager.gdm.extraConfig = '' + AutomaticLoginEnable=false + TimedLoginEnable=false + PasswordAutocomplete=false + ''; }