1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-09 03:55:44 +03:00

nixos/samba: add documentation

This commit is contained in:
Anthony Roussel 2024-04-08 22:38:07 +02:00 committed by Pascal Bach
parent 988c598106
commit 3b48a7e013
3 changed files with 47 additions and 1 deletions

View file

@ -0,0 +1,41 @@
# Samba {#module-services-samba}
[Samba](https://www.samba.org/), a SMB/CIFS file, print, and login server for Unix.
## Basic Usage {#module-services-samba-basic-usage}
A minimal configuration looks like this:
```nix
{
services.samba.enable = true;
}
```
This configuration automatically enables `smbd`, `nmbd` and `winbindd` services by default.
## Configuring {#module-services-samba-configuring}
Samba configuration is located in the `/etc/samba/smb.conf` file.
### File share {#module-services-samba-configuring-file-share}
This configuration will configure Samba to serve a `public` file share
which is read-only and accessible without authentication:
```nix
{
services.samba = {
enable = true;
settings = {
"public" = {
"path" = "/public";
"read only" = "yes";
"browseable" = "yes";
"guest ok" = "yes";
"comment" = "Public samba share.";
};
};
};
}
```

View file

@ -42,6 +42,11 @@ let
in
{
meta = {
doc = ./samba.md;
maintainers = [ lib.maintainers.anthonyroussel ];
};
imports = [
(mkRemovedOptionModule [ "services" "samba" "defaultShare" ] "")
(mkRemovedOptionModule [ "services" "samba" "syncPasswordsByPam" ] "This option has been removed by upstream, see https://bugzilla.samba.org/show_bug.cgi?id=10669#c10")