From 3a0d4845b0c71218019479108c0d9b48dfc0f137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 14 May 2023 15:27:25 +0200 Subject: [PATCH] fix: use suspend and hibernate --- hosts/nixos-laptop/default.nix | 11 +---------- modules/programs/hyprland/default.nix | 10 ++++------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 42c242c..39725c7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -29,6 +29,7 @@ xserver.libinput.enable = true; xserver.libinput.touchpad.disableWhileTyping = true; printing.enable = true; + logind.lidSwitch = "suspend-and-hibernate"; }; hardware.bluetooth.enable = true; @@ -101,16 +102,6 @@ wantedBy = [ "multi-user.target" ]; }; - programs.ssh.extraConfig = '' - Host builder - Hostname 192.168.0.14 - Port 22 - User moritz - - IdentitiesOnly yes - IdentityFile /etc/ssh/ssh_host_ed25519_key - ''; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 3a3ffeb..6f0b197 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -118,12 +118,10 @@ in } ] ++ optional (!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728 - [ - { - timeout = 30 * 60; - command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate"; - } - ]; + { + timeout = 30 * 60; + command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate"; + }; systemdTarget = "hyprland-session.target"; }; };