helm/profiles/nfs/default.nix

36 lines
934 B
Nix
Raw Permalink Normal View History

2022-04-23 21:16:17 -07:00
{
#fileSystems."/export/" = {
# device = "/mnt/mafuyu";
# options = [ "bind" ];
#};
services.nfs.server = {
enable = true;
# fixed rpc.statd port; for firewall
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
extraNfsdConfig = '''';
exports = ''
2022-06-22 06:14:43 -07:00
/home/ftp 192.168.1.0/24(rw)
/mnt/one 192.168.1.0/24(rw)
/mnt/two 192.168.1.0/24(rw,no_subtree_check) 10.0.69.0/24(rw,no_subtree_check)
2022-06-22 06:14:43 -07:00
/mnt/three 192.168.1.0/24(rw)
'';
2022-04-23 21:16:17 -07:00
};
networking.firewall = {
2022-06-22 06:14:43 -07:00
allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
2022-04-23 21:16:17 -07:00
};
#systemd.services.create-mount-dir = {
# serviceConfig = {
# ExecStart = "mkdir /export";
# };
# wantedBy = [ "multi-user.target" ];
# after = [ "remote-fs.target" ];
# description = "Create a directory we can mount on fs";
#};
}