Disco: Make upgrade sleep inhibit work

This commit is contained in:
fruchti 2023-03-27 20:23:08 +02:00
parent 451605c50d
commit 670433245b

View file

@ -165,9 +165,12 @@
serviceConfig = {
# Workaround for https://github.com/systemd/systemd/issues/14045
ExecStartPre = "${pkgs.coreutils}/bin/sleep 10s";
ExecStart = lib.mkForce "systemd-inhibit --what=sleep --mode=delay --why='NixOS upgrade' ${updateScript}/bin/nixos-upgrade";
ExecStart = lib.mkForce "systemd-inhibit --what=sleep:handle-lid-switch --why='NixOS upgrade' ${updateScript}/bin/nixos-upgrade";
};
};
services.logind.extraConfig = ''
LidSwitchIgnoreInhibited = no
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions