nixops: disable suspend more aggressively

This commit is contained in:
Sebastien Bourdeauducq 2021-05-25 17:19:04 +08:00
parent f4e618ae9b
commit 573ab0102e
2 changed files with 24 additions and 2 deletions

View File

@ -117,11 +117,21 @@ in
services.xserver.xkbOptions = "eurosign:e";
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.autoSuspend = false;
powerManagement.enable = false;
services.xserver.desktopManager.gnome3.enable = true;
environment.gnome3.excludePackages = [ pkgs.epiphany pkgs.gnome3.geary ];
systemd.suppressedSystemUnits = [
"hibernate.target"
"suspend.target"
"suspend-then-hibernate.target"
"sleep.target"
"hybrid-sleep.target"
"systemd-hibernate.service"
"systemd-hybrid-sleep.service"
"systemd-suspend.service"
"systemd-suspend-then-hibernate.service"
];
hardware.bluetooth.enable = true;
programs.fish.enable = true;

View File

@ -104,6 +104,18 @@ in
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.xfce.enable = true;
systemd.suppressedSystemUnits = [
"hibernate.target"
"suspend.target"
"suspend-then-hibernate.target"
"sleep.target"
"hybrid-sleep.target"
"systemd-hibernate.service"
"systemd-hybrid-sleep.service"
"systemd-suspend.service"
"systemd-suspend-then-hibernate.service"
];
programs.fish.enable = true;
programs.fish.promptInit = ''
any-nix-shell fish --info-right | source