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
|
let
|
||||||
tftpRoot = pkgs.runCommand "tftproot" {} ''
|
tftpRoot = pkgs.runCommand "tftproot" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
cp -sr ${tftproots.rpi-netboot-tftproot}/* $out/
|
cp -sr ${tftproots.rpi-netboot-tftproot}/* $out/
|
||||||
${lib.concatMapStrings (host: ''
|
${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 (
|
builtins.attrNames (
|
||||||
lib.filterAttrs (_: { serial ? null, ... }: serial != null)
|
lib.filterAttrs (_: { serial ? null, ... }: serial != null)
|
||||||
|
@ -16,6 +17,12 @@ in
|
||||||
{
|
{
|
||||||
networking.firewall.enable = false;
|
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
|
# raspberrypi boot
|
||||||
services.atftpd = {
|
services.atftpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in New Issue