Add firewall config
This commit is contained in:
parent
26cd4f804c
commit
5777182658
1 changed files with 122 additions and 107 deletions
17
flake.nix
17
flake.nix
|
@ -7,7 +7,8 @@
|
|||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ]
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = nixpkgs.lib;
|
||||
|
@ -119,6 +120,20 @@
|
|||
capabilities = "cap_sys_admin+p";
|
||||
source = "${sunshine}/bin/sunshine";
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [
|
||||
48010
|
||||
];
|
||||
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 47984; to = 47990; }
|
||||
];
|
||||
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 47998; to = 48000; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue