mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(nftables): empty peeps
This commit is contained in:
parent
ceeb079b58
commit
0db7d3b943
1 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
hasSops = options ? sops.secrets;
|
hasSops = options ? sops.secrets;
|
||||||
in {
|
in {
|
||||||
options.networking.access.peeps = with lib.types; {
|
options.networking.access.peeps = with lib.types; {
|
||||||
enable = mkEnableOption "peeps" // {default = hasSops;};
|
enable = mkEnableOption "peeps" // {default = hasSops && cfg.ranges != {};};
|
||||||
ranges = mkOption {
|
ranges = mkOption {
|
||||||
type = attrsOf str;
|
type = attrsOf str;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
@ -57,7 +57,7 @@ in {
|
||||||
firewall.interfaces.peeps = {
|
firewall.interfaces.peeps = {
|
||||||
nftables.enable = cfg.enable;
|
nftables.enable = cfg.enable;
|
||||||
nftables.conditions = [
|
nftables.conditions = [
|
||||||
(mkIf (cfg.enable && networking.enableIPv6) condition)
|
(mkIf (cfg.enable && networking.enableIPv6 && cfg.ranges != {}) condition)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue