infra/nixos/hosts/eidola/samba.nix

43 lines
721 B
Nix
Raw Normal View History

2024-12-14 01:52:39 -06:00
{...}: {
users = {
2024-12-14 02:54:01 -06:00
users = let
shareUser = {
isSystemUser = true;
group = "share";
};
in {
min = shareUser;
2024-12-14 01:52:39 -06:00
};
2024-12-14 02:54:01 -06:00
groups."share" = {};
2024-12-14 01:52:39 -06:00
};
2024-12-14 02:54:01 -06:00
systemd.tmpfiles.rules = [
"d /terra/terrarium 0775 root share - -"
];
2024-12-14 01:52:39 -06:00
services.samba = {
enable = true;
openFirewall = true;
securityType = "user";
extraConfig = ''
browseable = yes
smb encrypt = required
2024-12-14 02:54:01 -06:00
valid users = @share
2024-12-14 01:52:39 -06:00
'';
shares = {
2024-12-14 02:54:01 -06:00
terrarium = {
"path" = "/terra/terrarium";
2024-12-14 01:52:39 -06:00
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
2024-12-14 02:54:01 -06:00
"create mask" = "0664";
"directory mask" = "0775";
2024-12-14 01:52:39 -06:00
};
};
};
}