diff options
author | Alan Pearce | 2022-06-25 00:51:57 +0200 |
---|---|---|
committer | Alan Pearce | 2022-06-25 00:51:57 +0200 |
commit | dc8eb3bdfe00599b888676a541c762c11ba8aa04 (patch) | |
tree | 4aca8d8cee9a20a4f2ad2f850363a5d2d2a0d120 /system/settings | |
parent | 82e270aeea4ba9bb745bd2488f66fe0145fed5b6 (diff) | |
download | nixfiles-dc8eb3bdfe00599b888676a541c762c11ba8aa04.tar.lz nixfiles-dc8eb3bdfe00599b888676a541c762c11ba8aa04.tar.zst nixfiles-dc8eb3bdfe00599b888676a541c762c11ba8aa04.zip |
prefect: configure samba
Diffstat (limited to 'system/settings')
-rw-r--r-- | system/settings/services/samba.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/system/settings/services/samba.nix b/system/settings/services/samba.nix new file mode 100644 index 00000000..63283e88 --- /dev/null +++ b/system/settings/services/samba.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +let + workgroup = "WORKGROUP"; + +in +{ + services.samba-wsdd = { + inherit workgroup; + enable = true; + }; + networking.firewall.allowedTCPPorts = [ 5357 ]; + networking.firewall.allowedUDPPorts = [ 3702 ]; + + services.samba = { + enable = true; + openFirewall = true; + securityType = "user"; + extraConfig = '' + workgroup = ${workgroup} + server string = ${config.networking.hostName} + netbios name = ${config.networking.hostName} + security = user + #use sendfile = yes + #max protocol = smb2 + guest account = nobody + map to guest = bad user + ''; + }; +} |