summary refs log tree commit diff
path: root/nixos/modules/services/networking/unifi.nix
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-12-11 14:42:06 +0100
committerKerstin <kerstin@erictapen.name>2021-12-17 21:30:52 +0100
commit2000a1edcd0e02a114042081632ed87b4cc55031 (patch)
tree562d1ae33811d80bd9de9e770458358bac41f97b /nixos/modules/services/networking/unifi.nix
parente6188c00f05950f673e922d9864e8955dd268f89 (diff)
nixos/unifi: add deprecation warning for openPorts
modules are discouraged from opening ports in the firewall unless
explicitly told to do so. add a deprecation notice for this in unifi.
Diffstat (limited to 'nixos/modules/services/networking/unifi.nix')
-rw-r--r--nixos/modules/services/networking/unifi.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix
index 174e919f988b7..9750231e60342 100644
--- a/nixos/modules/services/networking/unifi.nix
+++ b/nixos/modules/services/networking/unifi.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, utils, ... }:
+{ config, options, lib, pkgs, utils, ... }:
 with lib;
 let
   cfg = config.services.unifi;
@@ -86,6 +86,10 @@ in
 
   config = mkIf cfg.enable {
 
+    warnings = optional
+      (options.services.unifi.openPorts.highestPrio >= (mkOptionDefault null).priority)
+      "The current services.unifi.openPorts = true default is deprecated and will change to false in 22.11. Set it explicitly to silence this warning.";
+
     users.users.unifi = {
       isSystemUser = true;
       group = "unifi";