nixos/ipa: replace activationScript
Replaced with a dedicated systemd service.
This commit is contained in:
parent
8d3cf213db
commit
65ff518a0d
1 changed files with 24 additions and 16 deletions
|
@ -181,7 +181,14 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
system.activationScripts.ipa = stringAfter ["etc"] ''
|
||||
systemd.services."ipa-activation" = {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
script = ''
|
||||
# libcurl requires a hard copy of the certificate
|
||||
if ! ${pkgs.diffutils}/bin/diff ${cfg.certificate} /etc/ipa/ca.crt > /dev/null 2>&1; then
|
||||
rm -f /etc/ipa/ca.crt
|
||||
|
@ -200,6 +207,7 @@ in {
|
|||
EOF
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
services.sssd.config = ''
|
||||
[domain/${cfg.domain}]
|
||||
|
|
Loading…
Reference in a new issue