linode builds both image and host

This commit is contained in:
Danilo Reyes
2026-02-09 00:13:59 -06:00
parent 7670f2fa94
commit 8d62cffc8e
6 changed files with 116 additions and 72 deletions

View File

@@ -1,5 +1,6 @@
{
lib,
config,
modulesPath,
...
}:
@@ -33,11 +34,17 @@
};
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f";
device = lib.mkForce (
if config.my.build.baseImage then
"/dev/sda"
else
"/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"
);
fsType = "ext4";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/f1408ea6-59a0-11ed-bc9d-525400000001"; }
swapDevices = lib.mkMerge [
[ { device = "/dev/disk/by-uuid/f1408ea6-59a0-11ed-bc9d-525400000001"; } ]
(lib.mkIf config.my.build.baseImage [ { device = "/dev/sdb"; } ])
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}