upate michishirube to grub bootloader

This commit is contained in:
TheWanderingCrow 2025-08-07 09:39:06 -04:00
parent 8ff51a7293
commit 206b9d6df6
2 changed files with 68 additions and 1 deletions

View file

@ -0,0 +1,67 @@
# NOTE: ... is needed because dikso passes diskoFile
{
lib,
disk ? "/dev/vda",
withSwap ? false,
swapSize,
...
}: {
disko.devices = {
disk = {
disk0 = {
type = "disk";
device = disk;
content = {
type = "table";
format = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "512M";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
part-type = "primary";
bootable = true;
content = {
type = "btrfs";
extraArgs = ["-f"]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@swap" = lib.mkIf withSwap {
mountpoint = "/.swapvol";
swap.swapfile.size = "${swapSize}G";
};
};
};
};
};
};
};
};
};
}

View file

@ -49,6 +49,6 @@ in {
};
boot.loader = {
grub.device = "/dev/sda";
grub.device = "/dev/sda1";
};
}