- add disko input; jupiter partitions/formats OS disk declaratively - hardware-configuration.nix carries kernel modules only (disko owns fileSystems) - data disk stays a plain unformatted mount, out of disko - vbox unchanged (virtualbox-image supplies its own disk) - README: nixos-anywhere remote install + daily rebuild loop Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ ... }:
|
|
|
|
# Declarative OS-disk layout (disko). UEFI: GPT with an ESP + ext4 root.
|
|
# disko both PARTITIONS/FORMATS this disk and generates the NixOS
|
|
# `fileSystems.*` entries, so hardware-configuration.nix must NOT define
|
|
# fileSystems for "/" or "/boot".
|
|
#
|
|
# ⚠️ This disk is WIPED on install. Set `device` to the OS disk ONLY.
|
|
# Your NAS data disk is NOT listed here — keep it out of disko so it is
|
|
# never formatted; mount it as a plain read-write fileSystem instead
|
|
# (see configuration.nix, /mnt/data).
|
|
#
|
|
# Find the stable id: ls -l /dev/disk/by-id (use by-id, never /dev/sdX)
|
|
{
|
|
disko.devices.disk.os = {
|
|
type = "disk";
|
|
device = "/dev/disk/by-id/CHANGE-ME-os-disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|