From 1bb37195c2d58dcc8ebd245184f091bd897f93e3 Mon Sep 17 00:00:00 2001 From: Jordan Ashurst Date: Fri, 18 Sep 2026 04:23:17 -0700 Subject: [PATCH] hosts/dogma-nixos: move samba.nix (exclusive to dogma-nixos) - relocate from modules/samba.nix, samba + wsdd exclusive per request --- hosts/dogma-nixos/samba.nix | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 hosts/dogma-nixos/samba.nix diff --git a/hosts/dogma-nixos/samba.nix b/hosts/dogma-nixos/samba.nix new file mode 100644 index 0000000..0a69cb2 --- /dev/null +++ b/hosts/dogma-nixos/samba.nix @@ -0,0 +1,72 @@ +{pkgs, ...}: { + services.samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "security" = "user"; + "workgroup" = "WORKGROUP"; + "server string" = "smbnix"; + "netbios name" = "smbnix"; + #"use sendfile" = "yes"; + #"max protocol" = "smb2"; + # note: localhost is the ipv6 localhost ::1 + "hosts allow" = "192.168.1.1/24 127.0.0.1 localhost"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + + "games" = { + "path" = "/mnt/games"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "media" = { + "path" = "/mnt/media"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "photos" = { + "path" = "/mnt/photo"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "winhdd" = { + "path" = "/mnt/winhdd"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "winback" = { + "path" = "/mnt/winbackup"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + }; + }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + environment.systemPackages = [pkgs.samba]; +}