diff --git a/main.nix b/main.nix index e91de43..4175ad0 100644 --- a/main.nix +++ b/main.nix @@ -3,6 +3,7 @@ hostName, user, enableSSHServer ? false, + firewall ? {enable = true;}, }: { ... }: let @@ -17,6 +18,7 @@ in }) (import ./modules/os/core.nix { hostName = hostName; + firewall = firewall; }) (import ./modules/os/ssh.nix { user = user; diff --git a/modules/os/core.nix b/modules/os/core.nix index 43e72fc..056b186 100644 --- a/modules/os/core.nix +++ b/modules/os/core.nix @@ -1,4 +1,4 @@ -{ hostName }: +{ hostName, firewall }: { pkgs, ... }: { # Bootloader. @@ -9,7 +9,7 @@ # Enable networking networking.networkmanager.enable = true; - networking.firewall.enable = false; + networking.firewall = firewall; # Set your time zone. time.timeZone = "America/Toronto"; diff --git a/modules/os/nix.nix b/modules/os/nix.nix index e235e8e..03e565e 100644 --- a/modules/os/nix.nix +++ b/modules/os/nix.nix @@ -3,4 +3,9 @@ { nixpkgs.config.allowUnfree = true; system.stateVersion = systemStateVersion; + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + }; + }; } \ No newline at end of file