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

38 lines
627 B
Nix
Raw Normal View History

2024-10-06 15:25:05 -05:00
{
pkgs,
flake,
...
2025-02-05 20:15:36 -06:00
}:
let
inherit (flake.config.services.instances)
2025-01-08 19:06:14 -06:00
samba
jellyfin
;
2024-10-19 18:22:29 -05:00
service = samba;
2025-02-05 20:15:36 -06:00
in
{
2024-10-06 15:25:05 -05:00
# 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 = {
2024-10-19 18:22:29 -05:00
${service.paths.path1} = {
2024-10-06 15:25:05 -05:00
path = jellyfin.paths.path0;
writable = "true";
};
};
};
};
networking = {
firewall = {
allowedTCPPorts = [
2024-10-19 18:22:29 -05:00
service.ports.port0
2024-10-06 15:25:05 -05:00
];
};
};
}