diff --git a/hosts/tsuki/services/samba.nix b/hosts/tsuki/services/samba.nix new file mode 100644 index 0000000..0cd888c --- /dev/null +++ b/hosts/tsuki/services/samba.nix @@ -0,0 +1,73 @@ +{ config, ... }: +{ + services.samba = { + enable = true; + openFirewall = true; + securityType = "user"; + + extraConfig = '' + workgroup = TSUKI + server string = smbnix + netbios name = smbnix + + security = user + + use sendfile = yes + min protocol = SMB2 + smb encrypt = desired + + # note: localhost is the ipv6 localhost ::1 + hosts allow = 10.0.0. 127.0.0.1 localhost + hosts deny = 0.0.0.0/0 + + guest ok = no + map to guest = never + ''; + + shares = { + media = { + "path" = "${config.machineVars.dataDrives.default}/media"; + "read only" = false; + "browseable" = "yes"; + "guest ok" = "no"; + "force group" = "media"; + "create mask" = "0644"; + "directory mask" = "0755"; + "comment" = "Pictures, music, videos, etc."; + }; + + momiji = { + "path" = config.machineVars.dataDrives.drives.momiji; + "read only" = false; + "browseable" = "yes"; + "guest ok" = "no"; + "valid users" = "h7x4"; + "create mask" = "0644"; + "directory mask" = "0755"; + "comment" = "Momiji data drive."; + }; + + cirno = { + "path" = config.machineVars.dataDrives.drives.cirno; + "read only" = false; + "browseable" = "yes"; + "guest ok" = "no"; + "valid users" = "h7x4"; + "create mask" = "0644"; + "directory mask" = "0755"; + "comment" = "Cirno data drive."; + }; + + home = { + "path" = config.users.users.h7x4.home; + "read only" = false; + "browseable" = "yes"; + "guest ok" = "no"; + "valid users" = "h7x4"; + "create mask" = "0644"; + "directory mask" = "0755"; + "comment" = "Home directory."; + }; + }; + }; +} diff --git a/hosts/tsuki/services/samba.todo.nix b/hosts/tsuki/services/samba.todo.nix deleted file mode 100644 index dafc6bb..0000000 --- a/hosts/tsuki/services/samba.todo.nix +++ /dev/null @@ -1,23 +0,0 @@ -{}: -{ - services.samba = { - enable = true; - - extraConfig = '' - ''; - - shares = { - plex = { - path = "/data/media"; - "read only" = false; - browseable = "yes"; - "guest ok" = "no"; - comment = "Pictures, music, videos, etc."; - }; - - # home = { - - # }; - }; - }; -}