From dfd9be293c1032d2497445f796b81540e672bb6b Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Sat, 15 Jul 2023 20:21:59 +0200 Subject: [PATCH] ADD network config for d2nix --- hosts/d2nix/nixos/network.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hosts/d2nix/nixos/network.nix diff --git a/hosts/d2nix/nixos/network.nix b/hosts/d2nix/nixos/network.nix new file mode 100644 index 0000000..61cc88a --- /dev/null +++ b/hosts/d2nix/nixos/network.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + networking = { +# useDHCP = false; + interfaces.enp0s31f6.useDHCP = true; + networkmanager.enable = true; + stevenblack.block = [ "fakenews" "gambling" "porn" ]; + firewall = { + enable = true; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + }; +}