dotfiles/modules/nixos/services/samba/default.nix

45 lines
898 B
Nix
Raw Normal View History

2025-03-29 23:08:26 -05:00
{
pkgs,
flake,
...
}:
let
2025-07-18 18:22:28 -05:00
inherit (flake.config.services)
instances
2025-03-29 23:08:26 -05:00
;
2025-07-18 18:22:28 -05:00
service = instances.samba;
2025-03-29 23:08:26 -05:00
in
{
# If you ever need to start fresh, you need to add yourself to the Samba users database:
# sudo smbpasswd -a username
services = {
samba = {
package = pkgs.samba4Full;
enable = true;
openFirewall = true;
settings = {
2025-07-18 18:22:28 -05:00
${instances.jellyfin.name} = {
path = instances.jellyfin.paths.path0;
2025-03-29 23:08:26 -05:00
writable = "true";
};
2025-07-18 18:22:28 -05:00
${instances.audiobookshelf.name} = {
path = instances.audiobookshelf.paths.path0;
writable = "true";
};
${instances.comfyui.name} = {
path = instances.comfyui.paths.path0;
2025-03-29 23:08:26 -05:00
writable = "true";
};
};
};
};
networking = {
firewall = {
allowedTCPPorts = [
service.ports.port0
];
};
};
}