Add firewall config

This commit is contained in:
Erwin Boskma 2022-09-26 12:05:41 +02:00
parent 26cd4f804c
commit 5777182658
Signed by: erwin
GPG key ID: 270B20D17394F7E5

View file

@ -7,7 +7,8 @@
}; };
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: flake-utils.lib.eachSystem [ "x86_64-linux" ]
(system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib; lib = nixpkgs.lib;
@ -119,6 +120,20 @@
capabilities = "cap_sys_admin+p"; capabilities = "cap_sys_admin+p";
source = "${sunshine}/bin/sunshine"; source = "${sunshine}/bin/sunshine";
}; };
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [
48010
];
allowedTCPPortRanges = [
{ from = 47984; to = 47990; }
];
allowedUDPPortRanges = [
{ from = 47998; to = 48000; }
];
};
}; };
}; };
}; };