2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-22 04:07:28 +01:00

Add nfs exports for backup

This commit is contained in:
Felix Albrigtsen 2023-04-24 17:08:23 +02:00
parent b8841a2c3e
commit 34b77b3ed0
2 changed files with 21 additions and 0 deletions

View File

@ -7,6 +7,7 @@
../../common/metrics-exporters.nix
./hardware-configuration.nix
./filesystems.nix
./exports.nix
#./vms.nix
./services/nginx

20
hosts/voyager/exports.nix Normal file
View File

@ -0,0 +1,20 @@
{ 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)
/export/riker-backup 192.168.10.4(rw,nohide,no_subtree_check,no_root_squash)
'';
};
networking.firewall.allowedTCPPorts = [ 2049 ];
}