start/stop firewall commands

This commit is contained in:
2023-07-26 15:10:39 +03:00
parent ab11ee31f2
commit 4522af453b
3 changed files with 87 additions and 79 deletions

View File

@@ -15,10 +15,12 @@
services.sshguard = {
enable = true;
blocktime = 900;
whitelist = [
"192.168.0.0/16"
myData.tailscale_subnet.cidr
] ++ (lib.catAttrs "publicIP" (lib.attrValues myData.hosts));
whitelist =
[
"192.168.0.0/16"
myData.tailscale_subnet.cidr
]
++ (lib.catAttrs "publicIP" (lib.attrValues myData.hosts));
};
};
}

View File

@@ -19,7 +19,10 @@ in {
enable = lib.mkEnableOption "backup zfs snapshots with borg";
passwordPath = lib.mkOption {type = str;};
sshKeyPath = lib.mkOption {type = nullOr path; default = null;};
sshKeyPath = lib.mkOption {
type = nullOr path;
default = null;
};
mountpoints = lib.mkOption {
default = {};
@@ -87,7 +90,8 @@ in {
}
// lib.optionalAttrs (attrs ? patterns) {
patterns = attrs.patterns;
} // lib.optionalAttrs (config.mj.base.zfsborg.sshKeyPath != null) {
}
// lib.optionalAttrs (config.mj.base.zfsborg.sshKeyPath != null) {
environment.BORG_RSH = ''ssh -i "${config.mj.base.zfsborg.sshKeyPath}"'';
};
})