mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/samba: accept lists (#341244)
This commit is contained in:
commit
36316edca3
1 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,9 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.samba;
|
cfg = config.services.samba;
|
||||||
|
|
||||||
settingsFormat = pkgs.formats.ini { };
|
settingsFormat = pkgs.formats.ini {
|
||||||
|
listToValue = lib.concatMapStringsSep " " (generators.mkValueStringDefault { });
|
||||||
|
};
|
||||||
# Ensure the global section is always first
|
# Ensure the global section is always first
|
||||||
globalConfigFile = settingsFormat.generate "smb-global.conf" { global = cfg.settings.global; };
|
globalConfigFile = settingsFormat.generate "smb-global.conf" { global = cfg.settings.global; };
|
||||||
sharesConfigFile = settingsFormat.generate "smb-shares.conf" (lib.removeAttrs 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;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ "root" ];
|
default = [ "root" ];
|
||||||
description = "List of users who are denied to login via Samba.";
|
description = "List of users who are denied to login via Samba.";
|
||||||
apply = x: lib.concatStringsSep " " x;
|
|
||||||
};
|
};
|
||||||
global."passwd program" = lib.mkOption {
|
global."passwd program" = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue