From 5fc5933f699105bc994ad9197859d52e07b690ac Mon Sep 17 00:00:00 2001 From: waveringana Date: Wed, 18 Jun 2025 22:46:15 -0400 Subject: [PATCH] samba --- hosts/valefar/default.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/hosts/valefar/default.nix b/hosts/valefar/default.nix index 6b20da7..5a17a06 100755 --- a/hosts/valefar/default.nix +++ b/hosts/valefar/default.nix @@ -160,6 +160,40 @@ ''; }; + services.samba = { + enable = true; + securityType = "user"; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server string" = "smbnix"; + "netbios name" = "smbnix"; + "security" = "user"; + "hosts allow" = "100.64. 10.0.0. 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + "guest ok" = "yes"; + "public" = "yes"; + }; + "storage" = { + "path" = "/storage"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "public" = "yes"; + "force user" = "nobody"; + "force group" = "nogroup"; + "create mask" = "0666"; + "directory mask" = "0777"; + }; + }; + }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; # ============================================================================= # SERVICES # =============================================================================