Add a default share to Samba to make creating simple fileserver easier

svn path=/nixos/trunk/; revision=20665
This commit is contained in:
Michael Raskin 2010-03-16 16:34:27 +00:00
parent bd81b7a173
commit 11f8647d73

View file

@ -49,6 +49,13 @@ let
private dir = ${privateDir}
${optionalString cfg.syncPasswordsByPam "pam password change = true"}
${if cfg.defaultShare.enable then ''
[default]
path = /home/smbd
read only = ${if cfg.defaultShare.writeable then "no" else "yes"}
guest ok = ${if cfg.defaultShare.guest then "yes" else "no"}
''else ""}
${cfg.extraConfig}
'';
@ -136,6 +143,22 @@ in
internal use to pass filepath to samba pam module
";
};
defaultShare = {
enable = mkOption {
description = "Whether to share /home/smbd as 'default'";
default = false;
};
writeable = mkOption {
description = "Whether to allow write access to default share";
default = false;
};
guest = mkOption {
description = "Whether to allow guest access to default share";
default = true;
};
};
};
};