From b2257f5bb9a0db80396db1b92de6051a4eb1e7f7 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Thu, 7 Aug 2025 09:12:34 -0400 Subject: [PATCH] upate michishirube to grub bootloader --- hosts/common/disks/digital-ocean-disks.nix | 6 --- hosts/common/disks/hetzner-disks.nix | 11 ----- hosts/common/disks/test-disk.nix | 43 +++++++++++++++++++ hosts/nixos/Michishirube/default.nix | 7 +-- .../Michishirube/hardware-configuration.nix | 1 + 5 files changed, 46 insertions(+), 22 deletions(-) delete mode 100644 hosts/common/disks/digital-ocean-disks.nix delete mode 100644 hosts/common/disks/hetzner-disks.nix create mode 100644 hosts/common/disks/test-disk.nix diff --git a/hosts/common/disks/digital-ocean-disks.nix b/hosts/common/disks/digital-ocean-disks.nix deleted file mode 100644 index fd537f7..0000000 --- a/hosts/common/disks/digital-ocean-disks.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; -} diff --git a/hosts/common/disks/hetzner-disks.nix b/hosts/common/disks/hetzner-disks.nix deleted file mode 100644 index 1503af7..0000000 --- a/hosts/common/disks/hetzner-disks.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - fileSystems."/" = { - device = "/dev/sda"; - fsType = "ext4"; - }; - - fileSystems."/efi" = { - device = "systemd-1"; - fsType = "autofs"; - }; -} diff --git a/hosts/common/disks/test-disk.nix b/hosts/common/disks/test-disk.nix new file mode 100644 index 0000000..53afb8e --- /dev/null +++ b/hosts/common/disks/test-disk.nix @@ -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 = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/nixos/Michishirube/default.nix b/hosts/nixos/Michishirube/default.nix index e904649..3fd3214 100644 --- a/hosts/nixos/Michishirube/default.nix +++ b/hosts/nixos/Michishirube/default.nix @@ -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"; }; } diff --git a/hosts/nixos/Michishirube/hardware-configuration.nix b/hosts/nixos/Michishirube/hardware-configuration.nix index 98cf605..908ec35 100644 --- a/hosts/nixos/Michishirube/hardware-configuration.nix +++ b/hosts/nixos/Michishirube/hardware-configuration.nix @@ -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"];