nixos/netbox: fix ldap configuration
This commit is contained in:
@@ -46,11 +46,10 @@ let
|
|||||||
installPhase = old.installPhase + ''
|
installPhase = old.installPhase + ''
|
||||||
ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py
|
ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py
|
||||||
'' + optionalString cfg.enableLdap ''
|
'' + 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 {
|
})).override {
|
||||||
plugins = ps: ((cfg.plugins ps)
|
inherit (cfg) plugins;
|
||||||
++ optionals cfg.enableLdap [ ps.django-auth-ldap ]);
|
|
||||||
};
|
};
|
||||||
netboxManageScript = with pkgs; (writeScriptBin "netbox-manage" ''
|
netboxManageScript = with pkgs; (writeScriptBin "netbox-manage" ''
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
@@ -143,6 +142,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.netbox.plugins = mkIf cfg.enableLdap (ps: [ ps.django-auth-ldap ]);
|
||||||
|
|
||||||
services.redis.servers.netbox.enable = true;
|
services.redis.servers.netbox.enable = true;
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
|
|||||||
Reference in New Issue
Block a user