Allow configuring GRUB in the nix config

This commit is contained in:
Manuel Thalmann 2024-07-16 22:17:55 +02:00
parent 7ef8e8ff18
commit 85da9c0ec9
2 changed files with 17 additions and 2 deletions

View file

@ -14,6 +14,20 @@
options = {
valhalla = {
boot = {
efiMountPoint = mkOption {
type = types.str;
description = "The mountpoint of the efi partition.";
default = "/boot";
};
label = mkOption {
type = types.str;
description = "The label of the boot entry.";
default = "OS";
};
};
setupUser = {
name = mkOption {
type = types.str;

View file

@ -1,4 +1,4 @@
{ ... }:
{ lib, config, ... }:
let
fs = import ../../lib/modules/partition/fs.nix;
in {
@ -16,7 +16,7 @@
type = "uefi";
size = "+1G";
format = fs.fat32;
mountPoint = "/boot";
mountPoint = config.valhalla.boot.efiMountPoint;
};
Swap = {
@ -26,6 +26,7 @@
OS = {
index = 3;
label = lib.mkDefault config.valhalla.boot.label;
type = "linux";
format = fs.ext4;
mountPoint = "/";