Disko 1.13.0+ rejects "100%FREE" in favor of "100%". Earlier commit139e5f3(from agent 'isogonalconguate') had this fix but got dropped during the agent-garbage cleanup (commit430252ais GRUB switch,5e1b369is systemd-boot,99b887eis original disko). This brings the fix back, with cleaned-up comments that reflect current reality (GRUB bootloader, BIOS mode). Session: verify plan
42 lines
No EOL
1.3 KiB
Nix
42 lines
No EOL
1.3 KiB
Nix
# disk-config.nix для muscari — Yandex Cloud VM
|
|
# YC VM из образа Debian 12: один диск /dev/vda (virtio scsi), GPT
|
|
# Используем disko для переформатирования под NixOS:
|
|
# - 512M ESP (vfat) для /boot — не используется в BIOS mode (GRUB ставит в MBR),
|
|
# но если когда-нибудь переключимся на UEFI, раздел будет готов
|
|
# - остальное → ext4 root
|
|
#
|
|
# Bootloader: GRUB (BIOS mode, см. hosts/muscari/default.nix)
|
|
|
|
{ lib, ... }:
|
|
{
|
|
disko.devices = {
|
|
disk.disk1 = {
|
|
device = lib.mkDefault "/dev/vda";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
name = "ESP";
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
};
|
|
root = {
|
|
name = "root";
|
|
size = "100%"; # disko 1.13+ требует "100%" вместо "100%FREE"
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
} |