fix(radius): Make it work

This commit is contained in:
Tom Hubrecht 2024-02-17 23:57:40 +01:00
parent 84892acd2d
commit 69ecadbbd1
2 changed files with 3 additions and 2 deletions

View file

@ -131,7 +131,7 @@ in
name: name:
{ secret, ipaddr }: { secret, ipaddr }:
'' ''
cat <<EOF >> ${cfg.configDir}/client.conf cat <<EOF >> ${cfg.configDir}/clients.conf
client ${name} { client ${name} {
ipaddr = ${ipaddr} ipaddr = ${ipaddr}
secret = $(cat "${secret}") secret = $(cat "${secret}")
@ -177,7 +177,7 @@ in
]; ];
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.freeradius}/bin/radiusd -f -d ${cfg.configDir} -l stdout"; ExecStart = "${cfg.freeradius}/bin/radiusd -X -f -d ${cfg.configDir} -l stdout";
ExecReload = [ ExecReload = [
"${cfg.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout" "${cfg.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout"
"${pkgs.coreutils}/bin/kill -HUP $MAINPID" "${pkgs.coreutils}/bin/kill -HUP $MAINPID"
@ -189,6 +189,7 @@ in
RestartSec = 2; RestartSec = 2;
LogsDirectory = "radius"; LogsDirectory = "radius";
StateDirectory = "radius"; StateDirectory = "radius";
RuntimeDirectory = "radius";
Environment = [ Environment = [
"KANIDM_RLM_CONFIG=/var/lib/radius/kanidm.toml" "KANIDM_RLM_CONFIG=/var/lib/radius/kanidm.toml"
"PYTHONPATH=${rlm_python.pythonPath}" "PYTHONPATH=${rlm_python.pythonPath}"