mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-02-25 21:52:33 -05:00
upate michishirube to grub bootloader
This commit is contained in:
parent
43cb5a6b41
commit
b2257f5bb9
5 changed files with 46 additions and 22 deletions
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/efi" = {
|
||||
device = "systemd-1";
|
||||
fsType = "autofs";
|
||||
};
|
||||
}
|
||||
43
hosts/common/disks/test-disk.nix
Normal file
43
hosts/common/disks/test-disk.nix
Normal 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 = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue