From 5d36e00b7df86c6675ff3e81349c6badf5f0a0c1 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Mon, 24 Aug 2020 09:55:22 -0400 Subject: [PATCH] nixos/sssd: fix the module 'system.nssModules' was not set correctly fix #91242 --- nixos/modules/services/misc/sssd.nix | 4 +++- nixos/tests/all-tests.nix | 1 + nixos/tests/sssd.nix | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 nixos/tests/sssd.nix diff --git a/nixos/modules/services/misc/sssd.nix b/nixos/modules/services/misc/sssd.nix index 3da99a3b38c1..386281e2b7cc 100644 --- a/nixos/modules/services/misc/sssd.nix +++ b/nixos/modules/services/misc/sssd.nix @@ -69,7 +69,7 @@ in { mode = "0400"; }; - system.nssModules = pkgs.sssd; + system.nssModules = [ pkgs.sssd ]; system.nssDatabases = { group = [ "sss" ]; passwd = [ "sss" ]; @@ -92,4 +92,6 @@ in { services.openssh.authorizedKeysCommand = "/etc/ssh/authorized_keys_command"; services.openssh.authorizedKeysCommandUser = "nobody"; })]; + + meta.maintainers = with maintainers; [ bbigras ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fdfe2cfef290..1a8d6a1e9a77 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -320,6 +320,7 @@ in spike = handleTest ./spike.nix {}; sonarr = handleTest ./sonarr.nix {}; sslh = handleTest ./sslh.nix {}; + sssd = handleTestOn ["x86_64-linux"] ./sssd.nix {}; strongswan-swanctl = handleTest ./strongswan-swanctl.nix {}; sudo = handleTest ./sudo.nix {}; switchTest = handleTest ./switch-test.nix {}; diff --git a/nixos/tests/sssd.nix b/nixos/tests/sssd.nix new file mode 100644 index 000000000000..4c6ca86c74c8 --- /dev/null +++ b/nixos/tests/sssd.nix @@ -0,0 +1,17 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +{ + name = "sssd"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ bbigras ]; + }; + machine = { pkgs, ... }: { + services.sssd.enable = true; + }; + + testScript = '' + start_all() + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("sssd.service") + ''; +})