From dc8eb3bdfe00599b888676a541c762c11ba8aa04 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 25 Jun 2022 00:51:57 +0200 Subject: prefect: configure samba --- system/settings/services/samba.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 system/settings/services/samba.nix (limited to 'system/settings/services/samba.nix') 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 + ''; + }; +} -- cgit 1.4.1