Compare commits

...

5 Commits

Author SHA1 Message Date
chn
91db634820 devices.srv1.node1: fix nfs 2024-09-17 10:06:56 +08:00
chn
9fff0e1b4b devices.srv1: fix nfs 2024-09-16 19:38:59 +08:00
chn
ddcaffaff1 devices.srv1.node1: fix nfs 2024-09-16 18:28:03 +08:00
chn
080c64f635 devices.srv1.node0: fix nfs 2024-09-16 18:26:15 +08:00
chn
40878a01b2 modules.system: fix nfs support 2024-09-16 17:56:59 +08:00
5 changed files with 31 additions and 3 deletions

View File

@ -31,12 +31,25 @@ inputs:
services.nfs.server =
{
enable = true;
exports = "/home 192.168.178.0/24(rw)";
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

@ -13,6 +13,7 @@ inputs:
eno2 = { ip = "192.168.178.2"; mask = 24; gateway = "192.168.178.1"; };
};
cluster.nodeType = "worker";
initrd.sshd.enable = true;
};
services.beesd.instances.root = { device = "/"; hashTableSizeMB = 256; threads = 4; };
packages =
@ -47,5 +48,14 @@ inputs:
neededForBoot = true;
};
};
boot.initrd.network.enable = true;
boot.initrd.systemd.network.networks."10-eno2" = inputs.config.systemd.network.networks."10-eno2";
boot.initrd.systemd.extraBin =
{
"ifconfig" = "${inputs.pkgs.nettools}/bin/ifconfig";
"mount.nfs" = "${inputs.pkgs.nfs-utils}/bin/mount.nfs";
"mount.nfs4" = "${inputs.pkgs.nfs-utils}/bin/mount.nfs4";
};
services.rpcbind.enable = true;
};
}

View File

@ -14,7 +14,7 @@ inputs:
time.timeZone = "Asia/Shanghai";
boot =
{
supportedFilesystems = [ "ntfs" ];
supportedFilesystems = [ "ntfs" "nfs" "nfsv4" ];
# consoleLogLevel = 7;
};
hardware.enableAllFirmware = true;

View File

@ -34,7 +34,8 @@ inputs:
services.resolved.enable = false;
};
# ip=dhcp only attain ipv4
kernelParams = [ "ip=on" ];
# ip=on will reset systemd-networkd configs
# kernelParams = [ "ip=on" ];
};
}
)

View File

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