nix-build: serve actual nfsroot/dacbert/boot on tftp
nix-build no longer provides a prebuilt nixos for dacbert now
This commit is contained in:
parent
ceca35caff
commit
b16e7e32c7
|
@ -2,9 +2,10 @@
|
|||
let
|
||||
tftpRoot = pkgs.runCommand "tftproot" {} ''
|
||||
mkdir $out
|
||||
|
||||
cp -sr ${tftproots.rpi-netboot-tftproot}/* $out/
|
||||
${lib.concatMapStrings (host: ''
|
||||
ln -s ${tftproots."${host}-tftproot"} $out/${hostRegistry.hosts.${host}.serial}
|
||||
ln -s /var/lib/nfsroot/dacbert/boot $out/${hostRegistry.hosts.${host}.serial}
|
||||
'') (
|
||||
builtins.attrNames (
|
||||
lib.filterAttrs (_: { serial ? null, ... }: serial != null)
|
||||
|
@ -16,6 +17,12 @@ in
|
|||
{
|
||||
networking.firewall.enable = false;
|
||||
|
||||
fileSystems."/var/lib/nfsroot/dacbert" = {
|
||||
device = "${hostRegistry.hosts.nfsroot.ip4}:/var/lib/nfsroot/dacbert";
|
||||
fsType = "nfs";
|
||||
options = [ "nfsvers=3" "proto=tcp" "nolock" "soft" "async" "ro" ];
|
||||
};
|
||||
|
||||
# raspberrypi boot
|
||||
services.atftpd = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in New Issue