devices.srv1: fix nfs

This commit is contained in:
陈浩南 2024-09-16 18:50:19 +08:00
parent ddcaffaff1
commit 9fff0e1b4b
3 changed files with 18 additions and 2 deletions

View File

@ -31,12 +31,25 @@ inputs:
services.nfs.server =
{
enable = true;
exports = "/home 192.168.178.0/24(rw,fsid=0)";
exports =
''
/ 192.168.178.0/24(rw,no_root_squash,fsid=0,sync,crossmnt)
/home 192.168.178.0/24(rw,no_root_squash,sync,crossmnt)
'';
};
networking =
{
firewall.allowedTCPPorts = [ 2049 ];
};
systemd.network.networks."10-eno146".networkConfig.IPMasquerade = "both";
services.rpcbind.enable = true;
fileSystems =
{
"/nix/share/home" =
{
device = "/home";
options = [ "rbind" ];
};
};
};
}

View File

@ -42,11 +42,12 @@ inputs:
{
"/home" =
{
device = "192.168.178.1:/";
device = "192.168.178.1:/home";
fsType = "nfs";
neededForBoot = true;
};
};
boot.initrd.network.enable = true;
services.rpcbind.enable = true;
};
}

View File

@ -35,6 +35,8 @@ inputs:
"megaraid_sas"
# disks for cluster
"nfs"
# netowrk for srv1
"bnx2x" "tg3"
]
++ (inputs.lib.optionals (kernel.variant != "nixos") [ "crypto_simd" ])
# for pi3b to show message over hdmi while boot