From 4c8a43881f3c6407491db1b93a2556088939d58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 11 Sep 2024 13:22:14 -0700 Subject: [PATCH] nixos/samba: accept lists --- nixos/modules/services/network-filesystems/samba.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index f236d44d5d0e..cb68a27b20dd 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -5,7 +5,9 @@ with lib; let cfg = config.services.samba; - settingsFormat = pkgs.formats.ini { }; + settingsFormat = pkgs.formats.ini { + listToValue = lib.concatMapStringsSep " " (generators.mkValueStringDefault { }); + }; # Ensure the global section is always first globalConfigFile = settingsFormat.generate "smb-global.conf" { global = cfg.settings.global; }; sharesConfigFile = settingsFormat.generate "smb-shares.conf" (lib.removeAttrs cfg.settings [ "global" ]); @@ -122,7 +124,6 @@ in type = lib.types.listOf lib.types.str; default = [ "root" ]; description = "List of users who are denied to login via Samba."; - apply = x: lib.concatStringsSep " " x; }; global."passwd program" = lib.mkOption { type = lib.types.str;