From e69c5844e094a39159bf5dd6f3d511db8e71e460 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 26 Feb 2024 21:17:02 +0100 Subject: [PATCH] working on orbi partition type. --- nixos/machines/orbi/disko-config.nix | 25 ++++++++----------------- nixos/machines/orbi/hetzner.nix | 10 +++++----- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/nixos/machines/orbi/disko-config.nix b/nixos/machines/orbi/disko-config.nix index 38b3e77..6aa2504 100644 --- a/nixos/machines/orbi/disko-config.nix +++ b/nixos/machines/orbi/disko-config.nix @@ -4,7 +4,8 @@ # nixos-install { config, lib, ... }: let - disks = [ "sda" "sdb" ]; + #disks = [ "sda" "sdb" ]; + disks = [ "sda" ]; in { # ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when i nix build something. @@ -21,16 +22,17 @@ in type = "disk"; device = "/dev/${disk}"; content = { - #type = "table"; type = "gpt"; partitions = { boot = { + priority = 0; #start = "0"; #end = "1M"; size = "1M"; type = "EF02"; # for grub MBR }; ESP = { + priority = 1; #start = "1M"; #end = "500M"; size = "500M"; @@ -39,27 +41,16 @@ in content = { type = "filesystem"; format = "vfat"; - # mountpoint = "/boot"; - mountpoint = "/boot_${disk}"; + mountpoint = "/boot"; + #mountpoint = "/boot_${disk}"; mountOptions = [ "defaults" ]; }; }; - #{ - # name = "ESP"; - # start = "1M"; - # end = "500MiB"; - # bootable = true; - # content = { - # type = "filesystem"; - # format = "vfat"; - # mountpoint = "/boot_${disk}"; - # mountOptions = [ "defaults" ]; - # }; - #} root = { #name = "zfs"; #start = "500M"; #end = "500G"; + priority = 10; size = "500G"; # content = { # type = "luks"; @@ -106,7 +97,7 @@ in zroot = { type = "zpool"; - mode = "mirror"; + #mode = "mirror"; rootFsOptions = { mountpoint = "none"; canmount = "off"; diff --git a/nixos/machines/orbi/hetzner.nix b/nixos/machines/orbi/hetzner.nix index 95cf8aa..8651de4 100644 --- a/nixos/machines/orbi/hetzner.nix +++ b/nixos/machines/orbi/hetzner.nix @@ -29,14 +29,14 @@ in { # needed lvm for raid #boot.initrd.kernelModules = [ ]; - boot.initrd.systemd.users.root.shell = "/bin/cryptsetup-askpass"; - boot.initrd.systemd.services.openssh = { - enable = true; - }; + #boot.initrd.systemd.users.root.shell = "/bin/cryptsetup-askpass"; + #boot.initrd.systemd.services.openssh = { + # enable = true; + #}; # Use GRUB2 as the boot loader. # We don't use systemd-boot because Hetzner uses BIOS legacy boot. - boot.loader.systemd-boot.enable = false; + #boot.loader.systemd-boot.enable = true; boot.loader.grub = { enable = true; efiSupport = false; # we created a ef02 partition because uefi is not supported on hetzner online machines.