mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
moved firewall to dedicated file
This commit is contained in:
parent
804c9fe070
commit
f7d70845e8
3 changed files with 22 additions and 4 deletions
|
@ -9,6 +9,7 @@
|
|||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
./modules/dnsmasq.nix
|
||||
./modules/firewall.nix
|
||||
./modules/forgejo.nix
|
||||
./modules/headscale.nix
|
||||
./modules/msmtp.nix
|
||||
|
@ -74,10 +75,6 @@
|
|||
# Lazy IPv6 connectivity for the container
|
||||
enableIPv6 = true;
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [80 443 3001 5432]; # port 3001 opened to allow git traffic on the local netword
|
||||
};
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
|
|
17
hosts/Alaska/modules/firewall.nix
Normal file
17
hosts/Alaska/modules/firewall.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
in
|
||||
{
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [80 443 5432];
|
||||
|
||||
extraCommands = with pkgs.lib; ''
|
||||
# ${pkgs.nftables}/bin/nft -f - <<EOF
|
||||
|
||||
# EOF
|
||||
${pkgs.nftables}/bin/nft insert rule filter nixos-fw ip saddr 100.64.0.0-100.64.255.255 iifname "enp2s0" counter
|
||||
'';
|
||||
}
|
||||
}
|
|
@ -7,6 +7,10 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [3001];
|
||||
}
|
||||
|
||||
system.activationScripts.copyStuff = "cp -r ${../../../rsrcs/giteaCustomDir}/. /Aurora/Forgejo/custom";
|
||||
system.activationScripts.copyTheme = "mkdir -p /Aurora/Forgejo/custom/public/assets/css && cp ${palenight}/dist/theme-palenight.css /Aurora/Forgejo/custom/public/assets/css/";
|
||||
|
||||
|
|
Loading…
Reference in a new issue