nixos/samba: add services.samba.configText option
The .configText option is for providing verbatim content of smb.conf. I'm adding this because I cannot seem to find any other way to override (with mkForce) the generated smb.conf with the current samba module. All attempts ends with errors ("duplicate entry samba/smb.conf").
This commit is contained in:
parent
753d9d4e4f
commit
3ebe3df4d0
@ -28,6 +28,7 @@ let
|
||||
'';
|
||||
|
||||
configFile = pkgs.writeText "smb.conf"
|
||||
(if cfg.configText != null then cfg.configText else
|
||||
''
|
||||
[ global ]
|
||||
log file = ${logDir}/log.%m
|
||||
@ -35,7 +36,7 @@ let
|
||||
${optionalString cfg.syncPasswordsByPam "pam password change = true"}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
'');
|
||||
|
||||
# This may include nss_ldap, needed for samba if it has to use ldap.
|
||||
nssModulesPath = config.system.nssModules.path;
|
||||
@ -133,6 +134,15 @@ in
|
||||
";
|
||||
};
|
||||
|
||||
configText = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = "
|
||||
Verbatim contents of smb.conf. If null (default), use the
|
||||
autogenerated file from NixOS instead.
|
||||
";
|
||||
};
|
||||
|
||||
securityType = mkOption {
|
||||
description = "Samba security type";
|
||||
default = "user";
|
||||
|
Loading…
Reference in New Issue
Block a user