From 82cb0c4b9563828f72343b77ecff7325ce6516c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 28 Nov 2023 22:57:58 +0200 Subject: [PATCH] fwminex: migrate to systemd-boot --- hosts/fwminex/configuration.nix | 47 ++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index 58498d4..0699692 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -5,19 +5,42 @@ }: let randr = import ./randr.nix; in { - zfs-root = { - boot = { - enable = true; - devNodes = "/dev/disk/by-id/"; - bootDevices = ["nvme-Samsung_SSD_970_EVO_Plus_2TB_S6P1NS0TA01331A"]; - immutable = false; + boot = { + initrd = { availableKernelModules = ["usb_storage" "sd_mod" "xhci_pci" "thunderbolt" "nvme" "usbhid"]; - removableEfi = true; - partitionScheme = { - efiBoot = "-part1"; - bootPool = "-part2"; - rootPool = "-part4"; - }; + }; + loader.systemd-boot.enable = true; + supportedFilesystems = ["zfs"]; + zfs = { + forceImportRoot = false; + devNodes = "/dev/disk/by-id/"; + }; + }; + + fileSystems = { + "/" = { + device = "rpool/nixos/root"; + fsType = "zfs"; + }; + "/boot" = { + device = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_2TB_S6P1NS0TA01331A_1-part2"; + fsType = "vfat"; + }; + "/home" = { + device = "rpool/nixos/home"; + fsType = "zfs"; + }; + "/nix" = { + device = "rpool/nixos/nix"; + fsType = "zfs"; + }; + "/var/lib" = { + device = "rpool/nixos/var/lib"; + fsType = "zfs"; + }; + "/var/log" = { + device = "rpool/nixos/var/log"; + fsType = "zfs"; }; };