Skip to content

Commit

Permalink
nixos/samba: accept lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Sep 13, 2024
1 parent e50aafe commit 4c8a438
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nixos/modules/services/network-filesystems/samba.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4c8a438

Please sign in to comment.