summaryrefslogtreecommitdiff
path: root/configuration/snorlax/samba.nix
blob: 44a4be94ee2b7e6de5e31e685783ec39b8eb5148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
	};
}