Archived
Linode provisions and sizes /dev/sda (root) and /dev/sdb (swap) itself as whole, unpartitioned block devices before the OS ever boots. modules/disko/linode.nix declares them with destroy = false (skips Disko's wipe stage for these disks entirely) and a bare filesystem/swap content type matching that existing layout, so re-running it against an already-provisioned disk only mkfs/mkswaps if blkid shows it isn't formatted yet -- never repartitions or destroys data. With every host reachable through the installer menu now carrying a Disko config, auto-install.sh no longer needs to probe the flake and branch between `disko --mode destroy,format,mount` and a bind-mount fallback -- it just always runs Disko. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
36 lines
1.0 KiB
Nix
36 lines
1.0 KiB
Nix
_:
|
|
|
|
{
|
|
# Linode provisions and sizes these disks itself (via the Linode
|
|
# dashboard/API) before the OS ever boots, and presents them as whole,
|
|
# unpartitioned block devices — /dev/sda is the root filesystem directly,
|
|
# /dev/sdb is swap directly, no partition table on either. Nothing here
|
|
# should ever repartition or resize them:
|
|
# - `destroy = false` skips each disk entirely during disko's destroy
|
|
# stage (see disko's disk.destroy option) — no wipefs, ever.
|
|
# - the filesystem content type's own create step only runs mkfs if the
|
|
# device isn't already formatted (checked via `blkid`), so re-running
|
|
# this against an already-provisioned Linode disk is a no-op.
|
|
disko.devices.disk = {
|
|
main = {
|
|
device = "/dev/sda";
|
|
destroy = false;
|
|
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
|
|
swap = {
|
|
device = "/dev/sdb";
|
|
destroy = false;
|
|
|
|
content = {
|
|
type = "swap";
|
|
};
|
|
};
|
|
};
|
|
}
|