Make gopkgs a split package

This commit is contained in:
Geoffrey “Frogeye” Preud'homme 2025-04-09 01:12:49 +02:00
parent 69fac057b2
commit 960bc776bb
No known key found for this signature in database
GPG key ID: C72403E7F82E6AD8
2 changed files with 14 additions and 3 deletions

View file

@ -36,6 +36,12 @@ buildGo124Module {
)) ))
); );
}; };
outputs = [
"out"
"ldap"
"proxy"
"radius"
];
subPackages = [ subPackages = [
"cmd/ldap" "cmd/ldap"
"cmd/server" "cmd/server"
@ -48,5 +54,10 @@ buildGo124Module {
postInstall = '' postInstall = ''
wrapProgram $out/bin/server --prefix PATH : ${authentikComponents.pythonEnv}/bin wrapProgram $out/bin/server --prefix PATH : ${authentikComponents.pythonEnv}/bin
wrapProgram $out/bin/server --prefix PYTHONPATH : ${authentikComponents.staticWorkdirDeps} 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/
''; '';
} }

View file

@ -458,7 +458,7 @@ in
UMask = "0027"; UMask = "0027";
WorkingDirectory = "%t/authentik-ldap"; WorkingDirectory = "%t/authentik-ldap";
DynamicUser = true; 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 ]; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
Restart = "on-failure"; Restart = "on-failure";
}; };
@ -489,7 +489,7 @@ in
UMask = "0027"; UMask = "0027";
WorkingDirectory = "%t/authentik-proxy"; WorkingDirectory = "%t/authentik-proxy";
DynamicUser = true; 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 ]; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
Restart = "on-failure"; Restart = "on-failure";
}; };
@ -516,7 +516,7 @@ in
UMask = "0027"; UMask = "0027";
WorkingDirectory = "%t/authentik-radius"; WorkingDirectory = "%t/authentik-radius";
DynamicUser = true; 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 ]; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
Restart = "on-failure"; Restart = "on-failure";
}; };