nixos/netbox: fix ldap configuration

This commit is contained in:
Minijackson 2022-11-07 13:58:22 +01:00 committed by Yureka
parent 01932120ab
commit 31f1a9a2a9

View File

@ -46,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}
@ -143,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 = {