diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-10 14:44:33 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-10 14:44:33 -0700 |
commit | 6a5cb9b7544168e7136ab2dbd833c9fc63020db7 (patch) | |
tree | 88db9fe9f436648acba60ffea98fd47942343b74 /modules/services/unifi | |
parent | add a module for backup with restic (diff) | |
download | world-6a5cb9b7544168e7136ab2dbd833c9fc63020db7.tar.gz |
secrets: move all the secrets under module/
Refactor a bit the configuration, which should simplify the management and usage of secrets from now on.
Diffstat (limited to 'modules/services/unifi')
-rw-r--r-- | modules/services/unifi/default.nix | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/services/unifi/default.nix b/modules/services/unifi/default.nix index c36860a..ee5ec6d 100644 --- a/modules/services/unifi/default.nix +++ b/modules/services/unifi/default.nix @@ -2,6 +2,7 @@ let cfg = config.my.services.unifi; + secrets = config.age.secrets; allowedRules = { # https://help.ubnt.com/hc/en-us/articles/218506997 allowedTCPPorts = [ @@ -33,20 +34,13 @@ in { unifiPackage = pkgs.unifiStable; }; - age.secrets.unifi-read-only = { - file = ../../../secrets/unifi/unifi-poller.age; - mode = "0400"; - owner = "unifi-poller"; - }; - services.unifi-poller = { enable = true; unifi.defaults = { url = "https://127.0.0.1:8443"; user = "unifipoller"; - pass = config.age.secrets.unifi-read-only.path; - + pass = secrets."unifi/unifi-poller".path; verify_ssl = false; }; |