summary refs log tree commit diff
diff options
context:
space:
mode:
authorBruno Bigras <bigras.bruno@gmail.com>2020-08-24 09:55:22 -0400
committerBruno Bigras <bigras.bruno@gmail.com>2020-08-24 10:10:47 -0400
commit5d36e00b7df86c6675ff3e81349c6badf5f0a0c1 (patch)
tree68cb83a39577abba17c7ed9ef3960df4e0aa44e6
parentb77d8ead284c4193f84c82d2fcd4a3aa11fbf158 (diff)
downloadnixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar.gz
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar.bz2
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar.lz
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar.xz
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.tar.zst
nixpkgs-5d36e00b7df86c6675ff3e81349c6badf5f0a0c1.zip
nixos/sssd: fix the module
'system.nssModules' was not set correctly

fix #91242
-rw-r--r--nixos/modules/services/misc/sssd.nix4
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/sssd.nix17
3 files changed, 21 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/sssd.nix b/nixos/modules/services/misc/sssd.nix
index 3da99a3b38c..386281e2b7c 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 fdfe2cfef29..1a8d6a1e9a7 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 00000000000..4c6ca86c74c
--- /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")
+    '';
+})