From b9685178d4c5b231b9cb5abfe81fe4d01c5a3d9e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 28 Dec 2024 13:41:53 -0600 Subject: [PATCH] Foxtrot won't boot --- disko/default.nix | 61 +++++++++++++++++++++++++++++++---------------- flake.nix | 2 +- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/disko/default.nix b/disko/default.nix index 04577ef..9fd6c8c 100644 --- a/disko/default.nix +++ b/disko/default.nix @@ -1,23 +1,34 @@ {lib, ...}: let inherit (lib.attrsets) mapAttrs' filterAttrs; - ESP = size: { - priority = 1; - start = "1M"; - label = "EFI"; - name = "ESP"; - end = size; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "umask=0077" - ]; - }; - }; -in { + ESP = inputs @ { + size ? "4G", + label ? "ESP", + name ? "ESP", + }: + { + priority = 1; + start = "1M"; + label = label; + name = name; + end = size; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "umask=0077" + ]; + }; + } + // inputs; +in rec { standardWithHibernateSwap = { + esp ? { + label = "ESP"; + size = "4G"; + name = "ESP"; + }, disk, swapSize, ... @@ -37,7 +48,7 @@ in { content = { type = "gpt"; partitions = { - ESP = ESP "4G"; + ESP = ESP esp; swap = { size = swapSize; content = { @@ -82,6 +93,16 @@ in { }; }; }; + + foxtrot = standardWithHibernateSwap { + disk = "nvme0n1"; + swapSize = "32G"; + esp = { + label = "EFI"; + name = "EFI"; + }; + }; + standard = {disk, ...}: { # this is my standard partitioning scheme for my machines: an LUKS-encrypted # btrfs volume @@ -93,7 +114,7 @@ in { content = { type = "gpt"; partitions = { - ESP = ESP "4G"; + ESP = ESP {size = "4G";}; luks = { size = "100%"; content = { @@ -140,7 +161,7 @@ in { content = { type = "gpt"; partitions = { - ESP = ESP "5G"; + ESP = ESP {size = "5G";}; root = { size = "100%"; content = { diff --git a/flake.nix b/flake.nix index 4b98250..3157111 100644 --- a/flake.nix +++ b/flake.nix @@ -461,7 +461,7 @@ modules = with nixosModules; [ home-manager-unstable-defaults - outputs.diskoConfigurations.standardWithHibernateSwap + outputs.diskoConfigurations.foxtrot hardware.nixosModules.framework-13-7040-amd common