summaryrefslogtreecommitdiff
path: root/configuration/snorlax/samba.nix
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-02-09 19:42:29 +0100
committerJasper Ras <jaspert.ras@gmail.com>2025-02-09 19:42:29 +0100
commit73616d498ca7e15c07ab53744da42db56ca51010 (patch)
tree89baef25fa52337482a0cc4ecd3cb0eb8435ec1d /configuration/snorlax/samba.nix
parent9d887bf07ac1dec542028212909b9ac7e461d0db (diff)
samba meuk
Diffstat (limited to 'configuration/snorlax/samba.nix')
-rw-r--r--configuration/snorlax/samba.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/configuration/snorlax/samba.nix b/configuration/snorlax/samba.nix
new file mode 100644
index 0000000..44a4be9
--- /dev/null
+++ b/configuration/snorlax/samba.nix
@@ -0,0 +1,37 @@
+{ ... }:
+{
+ services.samba = {
+ enable = true;
+ securityType = "user";
+ openFirewall = true;
+ settings = {
+ global = {
+ "workgroup" = "WORKGROUP";
+ "server string" = "smbnix";
+ "netbios name" = "smbnix";
+ "security" = "user";
+ "hosts allow" = "192.168.50. 127.0.0.1 localhost";
+ "hosts deny" = "0.0.0.0/0";
+ "guest account" = "nobody";
+ "map to guest" = "bad user";
+ };
+
+ photos = {
+ "path" = "/srv/samba/photos";
+ "browseable" = "yes";
+ "read only" = "no";
+ "guest ok" = "yes";
+ "create mask" = "0644";
+ "directory mask" = "0755";
+ "force user" = "nobody";
+ "force group" = "nogroup";
+ };
+ };
+ };
+
+ # Used to advertise to Windows hosts
+ services.samba-wsdd = {
+ enable = true;
+ openFirewall = true;
+ };
+}