diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-11-30 12:01:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 12:01:13 +0000 |
commit | b910b259768a5f5ae6d84347d5ef128bc119067b (patch) | |
tree | 22852525297b6c28018f5a18d406466d6af83926 /nixos | |
parent | 21716f16b7440b8a646a183d24ade4f059ec40e4 (diff) | |
parent | 5b6e95b131ac7617419e5d2cb695f686ba457c30 (diff) |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/netbox.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index f09a8dfc5b21..800af234e278 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -9,6 +9,10 @@ let name = "configuration.py"; text = '' STATIC_ROOT = '${staticDir}' + MEDIA_ROOT = '${cfg.dataDir}/media' + REPORTS_ROOT = '${cfg.dataDir}/reports' + SCRIPTS_ROOT = '${cfg.dataDir}/scripts' + ALLOWED_HOSTS = ['*'] DATABASE = { 'NAME': 'netbox', @@ -42,11 +46,10 @@ let installPhase = old.installPhase + '' ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py '' + optionalString cfg.enableLdap '' - ln -s ${ldapConfigPath} $out/opt/netbox/netbox/netbox/ldap_config.py + ln -s ${cfg.ldapConfigPath} $out/opt/netbox/netbox/netbox/ldap_config.py ''; })).override { - plugins = ps: ((cfg.plugins ps) - ++ optionals cfg.enableLdap [ ps.django-auth-ldap ]); + inherit (cfg) plugins; }; netboxManageScript = with pkgs; (writeScriptBin "netbox-manage" '' #!${stdenv.shell} @@ -139,6 +142,8 @@ in { }; config = mkIf cfg.enable { + services.netbox.plugins = mkIf cfg.enableLdap (ps: [ ps.django-auth-ldap ]); + services.redis.servers.netbox.enable = true; services.postgresql = { |