Allow configuring GRUB in the nix
config
This commit is contained in:
parent
476d56cf3f
commit
6283ed0803
2 changed files with 17 additions and 2 deletions
|
@ -14,6 +14,20 @@
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
valhalla = {
|
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 = {
|
setupUser = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
fs = import ../../lib/modules/partition/fs.nix;
|
fs = import ../../lib/modules/partition/fs.nix;
|
||||||
in {
|
in {
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
type = "uefi";
|
type = "uefi";
|
||||||
size = "+1G";
|
size = "+1G";
|
||||||
format = fs.fat32;
|
format = fs.fat32;
|
||||||
mountPoint = "/boot";
|
mountPoint = config.valhalla.boot.efiMountPoint;
|
||||||
};
|
};
|
||||||
|
|
||||||
Swap = {
|
Swap = {
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
OS = {
|
OS = {
|
||||||
index = 3;
|
index = 3;
|
||||||
|
label = lib.mkDefault config.valhalla.boot.label;
|
||||||
type = "linux";
|
type = "linux";
|
||||||
format = fs.ext4;
|
format = fs.ext4;
|
||||||
mountPoint = "/";
|
mountPoint = "/";
|
||||||
|
|
Loading…
Reference in a new issue