mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
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
@ -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
|
||||
|
@ -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")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user