upate michishirube to grub bootloader

This commit is contained in:
TheWanderingCrow 2025-08-07 09:12:34 -04:00
parent 43cb5a6b41
commit b2257f5bb9
5 changed files with 46 additions and 22 deletions

View file

@ -1,6 +0,0 @@
{
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
}

View file

@ -1,11 +0,0 @@
{
fileSystems."/" = {
device = "/dev/sda";
fsType = "ext4";
};
fileSystems."/efi" = {
device = "systemd-1";
fsType = "autofs";
};
}

View file

@ -0,0 +1,43 @@
# NOTE: ... is needed because dikso passes diskoFile
{
lib,
disk ? "/dev/vda",
withSwap ? false,
swapSize,
...
}: {
disko.devices = {
disk = {
disk0 = {
type = "disk";
device = disk;
content = {
type = "gpt";
partitions = {
boot = {
priority = 1;
name = "ESP";
start = "1M";
end = "512M";
type = "EF02";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["defaults"];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -14,7 +14,7 @@ in {
imports = lib.flatten [
# Disks
inputs.disko.nixosModules.disko
(lib.custom.relativeToRoot "hosts/common/disks/btrfs-disk.nix")
(lib.custom.relativeToRoot "hosts/common/disks/test-disk.nix")
{
_module.args = {
disk = "/dev/sda";
@ -49,9 +49,6 @@ in {
};
boot.loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
};
grub.device = "/dev/sda";
};
}

View file

@ -4,6 +4,7 @@
{modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "virtio_pci" "virtio_scsi"];