nixos/samba: add documentation

Changed files
+47 -1
nixos
doc
manual
release-notes
modules
services
network-filesystems
+1 -1
nixos/doc/manual/release-notes/rl-2411.section.md
···
- The `replay-sorcery` package and module was removed as it unmaintained upstream. Consider using `gpu-screen-recorder` or `obs-studio` instead.
-
- To follow [RFC 0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md) a few options of `samba` have been moved from `extraConfig` to the new freeform option `settings` and renamed, e.g.:
- `services.samba.invalidUsers` to `services.samba.settings.global."invalid users"`
- `services.samba.securityType` to `services.samba.settings.global."security type"`
- `services.samba.shares` to `services.samba.settings`
···
- The `replay-sorcery` package and module was removed as it unmaintained upstream. Consider using `gpu-screen-recorder` or `obs-studio` instead.
+
- To follow [RFC 0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md) a few options of `samba` have been moved from `extraConfig` and `configText` to the new freeform option `settings` and renamed, e.g.:
- `services.samba.invalidUsers` to `services.samba.settings.global."invalid users"`
- `services.samba.securityType` to `services.samba.settings.global."security type"`
- `services.samba.shares` to `services.samba.settings`
+41
nixos/modules/services/network-filesystems/samba.md
···
···
+
# 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.";
+
};
+
};
+
};
+
}
+
```
+5
nixos/modules/services/network-filesystems/samba.nix
···
in
{
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")
···
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")