2023-04-24 17:08:23 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
fileSystems = {
|
|
|
|
"/export/riker-backup" = {
|
|
|
|
device = "/tank/backup/riker";
|
|
|
|
options = [ "bind" ];
|
|
|
|
};
|
2023-10-05 22:04:10 +02:00
|
|
|
"/export/defiant-backup" = {
|
|
|
|
device = "/tank/backup/defiant";
|
|
|
|
options = [ "bind" ];
|
|
|
|
};
|
2023-04-24 17:08:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Enable nfs4 only
|
|
|
|
services.nfs.server = {
|
|
|
|
enable = true;
|
|
|
|
exports = ''
|
2023-10-05 22:04:10 +02:00
|
|
|
/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)
|
2023-06-22 00:20:35 +02:00
|
|
|
/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)
|
2023-10-05 22:04:10 +02:00
|
|
|
/export/defiant-backup 192.168.10.175(rw,nohide,no_subtree_check,async,no_root_squash)
|
2023-04-24 17:08:23 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-10-05 22:04:10 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ 111 2049 20048 ];
|
|
|
|
networking.firewall.allowedUDPPorts = [ 111 20048];
|
2023-04-24 17:08:23 +02:00
|
|
|
}
|