diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/flake.nix b/flake.nix index f1228c7..97c499e 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ nixosConfigurations.homelab = nixpkgs.lib.nixosSystem { modules = [ agenix.nixosModules.default + ./system.nix ./configuration.nix ./hardware-configuration.nix ./networking/host.nix diff --git a/system.nix b/system.nix index 26818b5..c5e3bdb 100644 --- a/system.nix +++ b/system.nix @@ -2,5 +2,16 @@ # System boots boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - nix.settings.experimental.features = [ "nix-commmand" "flakes" ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Don't turn off when lid is closed + services.logind.lidSwitchExternalPower = "ignore"; + + # Don't hybernate. You're a server! + systemd.sleep.extraConfig = '' + AllowSuspend=no + AllowHibernation=no + AllowHybridSleep=no + AllowSuspendThenHibernate=no + ''; }