dotfiles/nixos/boxes/bolty/nas.nix
Cyryl Płotnicki 205c2b9a11
Some checks failed
use nix / build (push) Failing after 4m0s
add ad blocking dns server
2024-12-01 15:59:42 +00:00

28 lines
1.1 KiB
Nix

{
config,
pkgs,
inputs,
lib,
...
}: {
users.users.sambaguest = {
isNormalUser = true;
extraGroups = [
];
home = "/data/shares/";
};
networking.firewall = {
enable = true;
allowPing = true;
};
networking.firewall.allowedTCPPorts = [2049];
services.nfs.server = {
enable = true;
exports = ''
/data/nfs 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/share 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/media 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/backups 10.0.0.244/24(rw,sync,insecure,no_subtree_check,fsid=0) 100.81.212.51(rw,sync,insecure,no_subtree_check) 10.0.0.156(rw,sync,insecure,no_subtree_check)
'';
};
}