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:
parent
21c47047c8
commit
48b0aa7164
2 changed files with 6 additions and 0 deletions
|
@ -77,6 +77,10 @@ in {
|
||||||
};
|
};
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf cfg.enable {
|
(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 = {
|
systemd.services.sssd = {
|
||||||
description = "System Security Services Daemon";
|
description = "System Security Services Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
@ -101,6 +105,7 @@ in {
|
||||||
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
|
mkdir -p "${dataDir}/conf.d"
|
||||||
[ -f ${settingsFile} ] && rm -f ${settingsFile}
|
[ -f ${settingsFile} ] && rm -f ${settingsFile}
|
||||||
old_umask=$(umask)
|
old_umask=$(umask)
|
||||||
umask 0177
|
umask 0177
|
||||||
|
|
|
@ -13,5 +13,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target")
|
||||||
machine.wait_for_unit("sssd.service")
|
machine.wait_for_unit("sssd.service")
|
||||||
|
machine.succeed("sssctl config-check")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue