diff options
author | Roland Synnestvedt <contact@rsynnest.com> | 2022-03-26 17:59:54 -0700 |
---|---|---|
committer | Roland Synnestvedt <contact@rsynnest.com> | 2022-03-26 17:59:54 -0700 |
commit | 95a3f6ad266c1a340630bbdb4787e202bf9bd883 (patch) | |
tree | d3d44341053a09de7c13c264c86ff32dfe5b78f7 /nixos/modules/services/video/unifi-video.nix | |
parent | cb1c5dbb15f1c2f0802007c7ac661d371d00babf (diff) | |
download | nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar.gz nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar.bz2 nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar.lz nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar.xz nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.tar.zst nixlib-95a3f6ad266c1a340630bbdb4787e202bf9bd883.zip |
nixos/unifi-video: rename openPorts to openFirewall
Diffstat (limited to 'nixos/modules/services/video/unifi-video.nix')
-rw-r--r-- | nixos/modules/services/video/unifi-video.nix | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/nixos/modules/services/video/unifi-video.nix b/nixos/modules/services/video/unifi-video.nix index 366a7111fde4..53acb9d79b91 100644 --- a/nixos/modules/services/video/unifi-video.nix +++ b/nixos/modules/services/video/unifi-video.nix @@ -145,13 +145,6 @@ in ''; }; - openPorts = mkOption { - type = types.bool; - default = true; - description = '' - Whether or not to open the required ports on the firewall. - ''; - }; maximumJavaHeapSize = mkOption { type = types.nullOr types.int; @@ -168,6 +161,13 @@ in defaultText = literalExpression ''"''${config.${opt.dataDir}}/unifi-video.pid"''; description = "Location of unifi-video pid file."; }; + openFirewall = mkOption { + type = types.bool; + default = true; + description = '' + Whether or not to open the required ports on the firewall. + ''; + }; }; @@ -182,7 +182,7 @@ config = mkIf cfg.enable { groups.unifi-video = {}; }; - networking.firewall = mkIf cfg.openPorts { + networking.firewall = mkIf cfg.openFirewall { # https://help.ui.com/hc/en-us/articles/217875218-UniFi-Video-Ports-Used allowedTCPPorts = [ 7080 # HTTP portal @@ -261,7 +261,9 @@ config = mkIf cfg.enable { }; - meta = { - maintainers = with lib.maintainers; [ rsynnest ]; - }; + imports = [ + (mkRenamedOptionModule [ "services" "unifi-video" "openPorts" ] [ "services" "unifi-video" "openFirewall" ]) + ]; + + meta.maintainers = with lib.maintainers; [ rsynnest ]; } |