diff --git a/nixos/hosts/eidola/mounts.nix b/nixos/hosts/eidola/mounts.nix index 3d33f4e..6098361 100644 --- a/nixos/hosts/eidola/mounts.nix +++ b/nixos/hosts/eidola/mounts.nix @@ -12,6 +12,7 @@ "/var/db/sudo" "/etc/zfs" + "/var/lib/samba" ]; files = [ "/etc/machine-id" diff --git a/nixos/hosts/eidola/samba.nix b/nixos/hosts/eidola/samba.nix index 6b97869..2e7c258 100644 --- a/nixos/hosts/eidola/samba.nix +++ b/nixos/hosts/eidola/samba.nix @@ -1,12 +1,20 @@ {...}: { users = { - users.min = { - isSystemUser = true; - group = "samba"; + users = let + shareUser = { + isSystemUser = true; + group = "share"; + }; + in { + min = shareUser; }; - groups."samba" = {}; + groups."share" = {}; }; + systemd.tmpfiles.rules = [ + "d /terra/terrarium 0775 root share - -" + ]; + services.samba = { enable = true; openFirewall = true; @@ -17,17 +25,17 @@ browseable = yes smb encrypt = required - valid users = @samba + valid users = @share ''; shares = { - terra = { - "path" = "/terra"; + terrarium = { + "path" = "/terra/terrarium"; "browseable" = "yes"; "read only" = "no"; "guest ok" = "no"; - "create mask" = "0644"; - "directory mask" = "0755"; + "create mask" = "0664"; + "directory mask" = "0775"; }; }; };