From dd265429be0eed7dd58678b50db168649ead997b Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 2 Aug 2023 15:39:25 +0000 Subject: [PATCH] Enable firewall --- machine/backyard/default.nix | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/machine/backyard/default.nix b/machine/backyard/default.nix index 1413ee9..45f0104 100644 --- a/machine/backyard/default.nix +++ b/machine/backyard/default.nix @@ -5,32 +5,29 @@ ./hardware-configuration.nix ]; - # Bootloader. boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; beatific.hostName = "backyard"; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Enable networking networking.networkmanager.enable = true; - users.users.tvb.extraGroups = [ "networkmanager" ]; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = false; + networking.firewall = { + enable = true; + allowedTCPPorts = [ + 80 # http + 443 # https + ]; + }; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? + # This value governs how some stateful data, like databases, are handled + # across different versions of NixOS. This should not be changed to a new + # release unless the sysadmin has determined that no services would be + # adversely affected by changing this. + system.stateVersion = "23.05"; }