diff --git a/components/gopkgs.nix b/components/gopkgs.nix index 7e520db..a97f97d 100644 --- a/components/gopkgs.nix +++ b/components/gopkgs.nix @@ -36,6 +36,12 @@ buildGo124Module { )) ); }; + outputs = [ + "out" + "ldap" + "proxy" + "radius" + ]; subPackages = [ "cmd/ldap" "cmd/server" @@ -48,5 +54,10 @@ buildGo124Module { postInstall = '' wrapProgram $out/bin/server --prefix PATH : ${authentikComponents.pythonEnv}/bin wrapProgram $out/bin/server --prefix PYTHONPATH : ${authentikComponents.staticWorkdirDeps} + + mkdir -p $ldap/bin $proxy/bin $radius/bin + mv $out/bin/ldap $ldap/bin/ + mv $out/bin/proxy $proxy/bin/ + mv $out/bin/radius $radius/bin/ ''; } diff --git a/module.nix b/module.nix index 43294aa..f76aa2d 100644 --- a/module.nix +++ b/module.nix @@ -458,7 +458,7 @@ in UMask = "0027"; WorkingDirectory = "%t/authentik-ldap"; DynamicUser = true; - ExecStart = "${config.services.authentik.authentikComponents.gopkgs}/bin/ldap"; + ExecStart = "${config.services.authentik.authentikComponents.gopkgs.ldap}/bin/ldap"; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; Restart = "on-failure"; }; @@ -489,7 +489,7 @@ in UMask = "0027"; WorkingDirectory = "%t/authentik-proxy"; DynamicUser = true; - ExecStart = "${config.services.authentik.authentikComponents.gopkgs}/bin/proxy"; + ExecStart = "${config.services.authentik.authentikComponents.gopkgs.proxy}/bin/proxy"; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; Restart = "on-failure"; }; @@ -516,7 +516,7 @@ in UMask = "0027"; WorkingDirectory = "%t/authentik-radius"; DynamicUser = true; - ExecStart = "${config.services.authentik.authentikComponents.gopkgs}/bin/radius"; + ExecStart = "${config.services.authentik.authentikComponents.gopkgs.radius}/bin/radius"; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; Restart = "on-failure"; };