From 861a04827a19facd4ce0eb4693de43f64507df52 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 19 May 2025 21:27:36 +0200 Subject: ... --- hosts/sif/default.nix | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'hosts') diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index f4de24e8..b50cad60 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -403,8 +403,8 @@ in { logind = { lidSwitch = "suspend"; - lidSwitchDocked = "lock"; - lidSwitchExternalPower = "lock"; + lidSwitchDocked = "ignore"; + lidSwitchExternalPower = "ignore"; }; atd = { @@ -610,25 +610,6 @@ in { environment.etc."X11/xorg.conf.d/50-wacom.conf".source = lib.mkForce ./wacom.conf; - systemd.services."ac-plugged" = { - description = "Inhibit handling of lid-switch and sleep"; - - path = with pkgs; [ systemd coreutils ]; - - script = '' - exec systemd-inhibit --what=handle-lid-switch --why="AC is connected" --mode=block sleep infinity - ''; - - serviceConfig = { - Type = "simple"; - }; - }; - - services.udev.extraRules = with pkgs; lib.mkAfter '' - SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" - SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" - ''; - systemd.services."nix-daemon".serviceConfig = { MemoryAccounting = true; MemoryHigh = "50%"; @@ -688,7 +669,7 @@ in { directories = [ "/nix" "/root" - "/home" + "/home" "/var/log" "/var/lib/sops-nix" "/var/lib/nixos" -- cgit v1.2.3