From aeb8102ae450d14611966b8160c79ccb4ff0c229 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sat, 3 Aug 2024 20:01:39 +0200 Subject: [PATCH] builders: do not mount / and /boot on netboot systems --- services/baremetal-builder/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/baremetal-builder/default.nix b/services/baremetal-builder/default.nix index 89936ff..52c2ab6 100644 --- a/services/baremetal-builder/default.nix +++ b/services/baremetal-builder/default.nix @@ -57,7 +57,7 @@ in boot.kernel.sysctl."fs.xfs.xfssyncd_centisecs" = "12000"; fileSystems = lib.mkMerge [ - { + (lib.mkIf (!cfg.netboot) { "/" = { device = "/dev/disk/by-label/root"; fsType = "xfs"; @@ -68,8 +68,8 @@ in fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; - } - (lib.mkIf (!cfg.netboot) { + }) + { "/mnt" = { device = "/dev/disk/by-label/hydra"; fsType = "xfs"; @@ -81,7 +81,7 @@ in device = "/mnt/tmp"; options = [ "bind" ]; }; - }) + } ]; swapDevices = lib.optionals (!cfg.netboot) [