2024-04-07 22:16:33 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-03-28 16:13:46 -04:00
|
|
|
options = {
|
2024-03-28 16:40:23 -04:00
|
|
|
homeLab.samba.enable =
|
2024-03-28 16:13:46 -04:00
|
|
|
lib.mkEnableOption "Enables /Archive and /Media samba shares.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf config.homeLab.samba.enable {
|
|
|
|
services = {
|
|
|
|
samba = {
|
|
|
|
enable = true;
|
|
|
|
securityType = "user";
|
|
|
|
openFirewall = true;
|
|
|
|
shares = {
|
|
|
|
Media = {
|
|
|
|
comment = "Media @Mauville";
|
|
|
|
path = "/mnt/Media";
|
|
|
|
browseable = "yes";
|
|
|
|
"read only" = "no";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
"create mask" = "0755";
|
|
|
|
"directory mask" = "0755";
|
|
|
|
};
|
|
|
|
Archive = {
|
|
|
|
comment = "Archive @Mauville";
|
|
|
|
path = "/mnt/Archive";
|
|
|
|
browseable = "yes";
|
|
|
|
"read only" = "no";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
"create mask" = "0755";
|
|
|
|
"directory mask" = "0755";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
samba-wsdd = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-03-28 16:40:23 -04:00
|
|
|
}
|