Allow configuring GRUB in the nix
config
This commit is contained in:
parent
476d56cf3f
commit
6283ed0803
|
@ -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;
|
||||
|
|
|
@ -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 = "/";
|
||||
|
|
Loading…
Reference in a new issue