mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29: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;
|
||||
in {
|
||||
options.networking.access.peeps = with lib.types; {
|
||||
enable = mkEnableOption "peeps" // {default = hasSops;};
|
||||
enable = mkEnableOption "peeps" // {default = hasSops && cfg.ranges != {};};
|
||||
ranges = mkOption {
|
||||
type = attrsOf str;
|
||||
default = {};
|
||||
|
|
@ -57,7 +57,7 @@ in {
|
|||
firewall.interfaces.peeps = {
|
||||
nftables.enable = cfg.enable;
|
||||
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