mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Add a default share to Samba to make creating simple fileserver easier
svn path=/nixos/trunk/; revision=20665
This commit is contained in:
parent
bd81b7a173
commit
11f8647d73
1 changed files with 23 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue