summaryrefslogtreecommitdiff
path: root/hosts/network.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/network.nix')
-rw-r--r--hosts/network.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/hosts/network.nix b/hosts/network.nix
new file mode 100644
index 0000000..433a206
--- /dev/null
+++ b/hosts/network.nix
@@ -0,0 +1,32 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
+ networking = {
+ # Pick only one of the below networking options.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+ networkmanager.enable = true; # Easiest to use and most distros use this by default.
+ nameservers = ["1.1.1.1" "1.0.0.1"];
+ #enableIPv6 = false;
+ # Configure network proxy if necessary
+ # proxy.default = "http://user:password@proxy:port/";
+ # proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+ };
+
+ # Enable the OpenSSH daemon.
+ networking.firewall = {
+ enable = false;
+ # Open ports in the firewall.
+ # allowedTCPPorts = [ ... ];
+ # allowedUDPPorts = [ ... ];
+ };
+
+ environment.systemPackages = [
+ pkgs.innernet
+ pkgs.iptables
+ ];
+
+ # services.opensnitch.enable = true;
+}