[pi4] Nftables firewall config, moved security.nix to security dir

This commit is contained in:
Martin Berg Alstad 2025-04-16 21:09:17 +00:00
parent 36ba00efc3
commit 244a029d70
Signed by: martials
GPG Key ID: E3FA0E995C0D0E5E
3 changed files with 22 additions and 1 deletions

View File

@ -13,7 +13,7 @@
./development.nix ./development.nix
./hardware.nix ./hardware.nix
./networking.nix ./networking.nix
./security.nix ./security
]; ];
system.stateVersion = systemConfig.version; system.stateVersion = systemConfig.version;

View File

@ -1,4 +1,8 @@
{ {
imports = [
./firewall.nix
];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;

View File

@ -0,0 +1,17 @@
{
networking = {
firewall = {
enable = true;
trustedInterfaces = [ "tailscale0" ];
extraInputRules =
let
localIPv4Range = "192.168.10.0/24";
in
''
ip saddr ${localIPv4Range} tcp dport 22 accept
ip saddr ${localIPv4Range} udp dport 22 accept
'';
};
nftables.enable = true;
};
}