nixos-config/hosts/voyager/exports.nix

23 lines
603 B
Nix

{ config, pkgs, lib, ... }:
{
fileSystems = {
"/export/riker-backup" = {
device = "/tank/backup/riker";
options = [ "bind" ];
};
};
# Enable nfs4 only
services.nfs.server = {
enable = true;
exports = ''
/export 192.168.10.4(rw,fsid=0,no_subtree_check) 192.168.10.5(rw,fsid=0,no_subtree_check)
/export/riker-backup 192.168.10.4(rw,nohide,no_subtree_check,no_root_squash)
/export/doyle-backup 192.168.10.5(rw,nohide,no_subtree_check,no_root_squash)
'';
};
networking.firewall.allowedTCPPorts = [ 2049 ];
}