Samba: Difference between revisions
imported>Fadenb Created page with "== Motivation == This guide will help you on how to use samba on nixos. == excerpt of /etc/nixos/configuration.nix == <pre> services.samba.enable = true; services.samb..." |
imported>Fadenb m Syntaxhighlight |
||
| Line 4: | Line 4: | ||
== excerpt of /etc/nixos/configuration.nix == | == excerpt of /etc/nixos/configuration.nix == | ||
<syntaxhighlight lang="nix"> | |||
services.samba.enable = true; | services.samba.enable = true; | ||
services.samba.securityType = "share"; | services.samba.securityType = "share"; | ||
| Line 22: | Line 22: | ||
public = yes | public = yes | ||
''; | ''; | ||
</ | </syntaxhighlight> | ||
If your firewall is enabled, or if you consider enabling it: | If your firewall is enabled, or if you consider enabling it: | ||
<syntaxhighlight lang="nix"> | |||
networking.firewall.enable = true; | networking.firewall.enable = true; | ||
networking.firewall.allowPing = true; | networking.firewall.allowPing = true; | ||
networking.firewall.allowedTCPPorts = [ 445 139 ]; | networking.firewall.allowedTCPPorts = [ 445 139 ]; | ||
networking.firewall.allowedUDPPorts = [ 137 138 ]; | networking.firewall.allowedUDPPorts = [ 137 138 ]; | ||
</ | </syntaxhighlight> | ||
{{Evaluate}} | {{Evaluate}} | ||
| Line 37: | Line 37: | ||
== stopping/restarting the services == | == stopping/restarting the services == | ||
<syntaxhighlight lang="console"> | |||
# systemctl stop samba | |||
# systemctl start samba | |||
# systemctl restart samba | |||
</syntaxhighlight> | |||
== links == | == links == | ||