nixos/sssd: create symlinks in /etc to fix sssctl

Without this, sssctl fails to read its configuration. Update the NixOS
test to ensure sssctl doesn't regress.
This commit is contained in:
Bjørn Forsman 2023-03-09 20:54:00 +01:00
parent 21c47047c8
commit 48b0aa7164
2 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,10 @@ in {
};
config = mkMerge [
(mkIf cfg.enable {
# For `sssctl` to work.
environment.etc."sssd/sssd.conf".source = settingsFile;
environment.etc."sssd/conf.d".source = "${dataDir}/conf.d";
systemd.services.sssd = {
description = "System Security Services Daemon";
wantedBy = [ "multi-user.target" ];
@ -101,6 +105,7 @@ in {
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
};
preStart = ''
mkdir -p "${dataDir}/conf.d"
[ -f ${settingsFile} ] && rm -f ${settingsFile}
old_umask=$(umask)
umask 0177

View File

@ -13,5 +13,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
start_all()
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("sssd.service")
machine.succeed("sssctl config-check")
'';
})