diff options
Diffstat (limited to 'hostnix/elmo/system.nix')
| -rw-r--r-- | hostnix/elmo/system.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hostnix/elmo/system.nix b/hostnix/elmo/system.nix index d92de59..311338f 100644 --- a/hostnix/elmo/system.nix +++ b/hostnix/elmo/system.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { boot.loader.systemd-boot.enable = true; @@ -10,4 +10,15 @@ networking.networkmanager.enable = true; time.timeZone = "America/New_York"; + + # https://nixos.wiki/wiki/Hardware/Apple#Auto_Restart + systemd.services.enable-autorestart = { + description = "Boot after power failure (server mode)"; + wantedBy = [ "default.target" ]; + serviceConfig = { + Type = "oneshot"; + }; + # https://superuser.com/a/1051137 + script = "${pkgs.pciutils}/bin/setpci -s 00:1f.0 0xa4.b=0"; + }; } |
