voyager/sarek: Fix NFS export

This commit is contained in:
Felix Albrigtsen 2023-10-05 22:04:10 +02:00
parent ec318f7f9d
commit 9c1ef59a22
3 changed files with 8 additions and 25 deletions

View File

@ -9,12 +9,6 @@
# ./hardware-configuration.nix # ./hardware-configuration.nix
]; ];
fileSystems."/mnt/backup" = {
fsType = "nfs";
device = "//voyager.home.feal.no/defiant-backup";
options = [ "defaults" "noauto" "x-systemd.automount" ];
};
# Boot and console is handled by proxmoxLXC. # Boot and console is handled by proxmoxLXC.
boot.loader.systemd-boot.enable = lib.mkForce false; # Enabled in base.nix, forced off here. boot.loader.systemd-boot.enable = lib.mkForce false; # Enabled in base.nix, forced off here.

View File

@ -5,17 +5,23 @@
device = "/tank/backup/riker"; device = "/tank/backup/riker";
options = [ "bind" ]; options = [ "bind" ];
}; };
"/export/defiant-backup" = {
device = "/tank/backup/defiant";
options = [ "bind" ];
};
}; };
# Enable nfs4 only # Enable nfs4 only
services.nfs.server = { services.nfs.server = {
enable = true; enable = true;
exports = '' exports = ''
/export 192.168.10.4(rw,fsid=0,no_subtree_check) 192.168.10.5(rw,fsid=0,no_subtree_check) 192.168.10.2(rw,fsid=0,no_subtree_check) /export 192.168.10.4(rw,fsid=0,no_subtree_check) 192.168.10.5(rw,fsid=0,no_subtree_check) 192.168.10.2(rw,fsid=0,no_subtree_check) 192.168.10.175(rw,fsid=0,no_subtree_check)
/export/riker-backup 192.168.10.2(rw,nohide,no_subtree_check,no_root_squash) /export/riker-backup 192.168.10.2(rw,nohide,no_subtree_check,no_root_squash)
/export/doyle-backup 192.168.10.2(rw,nohide,no_subtree_check,no_root_squash) /export/doyle-backup 192.168.10.2(rw,nohide,no_subtree_check,no_root_squash)
/export/defiant-backup 192.168.10.175(rw,nohide,no_subtree_check,async,no_root_squash)
''; '';
}; };
networking.firewall.allowedTCPPorts = [ 2049 ]; networking.firewall.allowedTCPPorts = [ 111 2049 20048 ];
networking.firewall.allowedUDPPorts = [ 111 20048];
} }

View File

@ -37,21 +37,4 @@
}; };
}; };
# Network mounts (export)
fileSystems = {
"/export/defiant-backup" = {
device = "/tank/backup/defiant";
options = [ "bind" ];
};
};
services.nfs = {
enable = true;
exports = ''
/export 192.168.10.181(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)
/export/defiant-backup 192.168.10.181(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
'';
};
} }