Compare commits
2 Commits
36ba00efc3
...
8244fe8927
Author | SHA1 | Date | |
---|---|---|---|
8244fe8927 | |||
244a029d70 |
@ -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;
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
}
|
|
14
hosts/pi4/security/default.nix
Normal file
14
hosts/pi4/security/default.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./firewall.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
pcscd.enable = true;
|
||||||
|
gnome.gnome-keyring.enable = true;
|
||||||
|
};
|
||||||
|
}
|
17
hosts/pi4/security/firewall.nix
Normal file
17
hosts/pi4/security/firewall.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user