diff --git a/samba.nix b/samba.nix new file mode 100644 index 0000000..ba2230d --- /dev/null +++ b/samba.nix @@ -0,0 +1,37 @@ +{ config, pkgs, ... }: + +{ + +services.samba = { + enable = true; + securityType = "user"; + extraConfig = '' + workgroup = WORKGROUP + server string = smbnix + netbios name = smbnix + security = user + #use sendfile = yes + #max protocol = smb2 + min protocol = NT1 + hosts allow = 192.168.0 localhost + hosts deny = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + ''; + shares = { + public = { + path = "/mnt/ps2"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "public" = "yes"; + "available" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "username"; + "force group" = "groupname"; + }; + }; +}; + +}