nix-config/modules/nixos/samba.nix
2026-01-23 13:33:51 +01:00

45 lines
885 B
Nix

{ pkgs, ... }:
{
services.samba = {
enable = true;
package = pkgs.samba4Full;
usershares.enable = true;
settings = {
global = {
"vfs objects" = "catia fruit streams_xattr";
"fruit:model" = "MacPro7,1@ECOLOR=226,226,224";
# "guest account" = "jan";
};
Cloud = {
path = "/mnt/sdb1/cloud";
writeable = "yes";
};
Media = {
path = "/mnt/sdb1/media";
writeable = "yes";
};
TimeMachine = {
path = "/mnt/sdb1/timemachine";
writeable = "yes";
"fruit:time machine" = "yes";
};
};
};
## Used to advertise the shares to Windows hosts
services.samba-wsdd = {
enable = true;
};
services.avahi = {
enable = true;
publish.enable = true;
publish.userServices = true;
};
users.users.jan.extraGroups = [ "samba" ];
}