mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:03:56 -05:00
42 lines
1,011 B
Nix
42 lines
1,011 B
Nix
{ pkgs, lib, config, ... }: {
|
|
|
|
options = {
|
|
homeLab.samba.enable =
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|