From 34279ed406c9d52dbb70a8f15203e9c4f01ecb39 Mon Sep 17 00:00:00 2001 From: materus Date: Thu, 18 May 2023 22:38:32 +0200 Subject: [PATCH] Move network settings --- configurations/host/materusPC/default.nix | 2 +- configurations/host/materusPC/network.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 configurations/host/materusPC/network.nix diff --git a/configurations/host/materusPC/default.nix b/configurations/host/materusPC/default.nix index 15ee621..c3c5d2d 100644 --- a/configurations/host/materusPC/default.nix +++ b/configurations/host/materusPC/default.nix @@ -6,9 +6,9 @@ ./hardware ./tmp.nix + ./network.nix ]; - networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; system.copySystemConfiguration = false; system.stateVersion = "23.05"; diff --git a/configurations/host/materusPC/network.nix b/configurations/host/materusPC/network.nix new file mode 100644 index 0000000..d2accf0 --- /dev/null +++ b/configurations/host/materusPC/network.nix @@ -0,0 +1,17 @@ +{ config, pkgs, lib, inputs, materusFlake, ... }: +{ + networking.useDHCP = lib.mkDefault true; + networking.hostName = "materusPC"; + networking.networkmanager.enable = true; + networking.firewall.enable = true; + networking.firewall.allowedTCPPorts = [ 24800 5900 5357 4656 ]; + networking.firewall.allowedUDPPorts = [ 24800 5900 3702 4656 ]; + + #Fix warning + networking.networkmanager.extraConfig = lib.mkDefault '' + [connectivity] + uri=http://nmcheck.gnome.org/check_network_status.txt + ''; + + +}