Reorganization
This commit is contained in:
parent
2821a76450
commit
aa3b8519f9
21 changed files with 241 additions and 204 deletions
15
modules/core/server-power.nix
Normal file
15
modules/core/server-power.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Server power management - disable sleep/hibernation
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Don't turn off when lid is closed (for laptop servers)
|
||||
services.logind.lidSwitchExternalPower = "ignore";
|
||||
|
||||
# Disable all sleep modes - this is a server!
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend=no
|
||||
AllowHibernation=no
|
||||
AllowHybridSleep=no
|
||||
AllowSuspendThenHibernate=no
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue