WIP refactor

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-03-14 18:56:54 -05:00
parent a5c14dc701
commit 4b1bf541cf
6 changed files with 95 additions and 14 deletions

View file

@ -5,21 +5,21 @@
}:
let
ccfg = import ../config.nix;
cfg = config.${ccfg.custom_config_key}.boot.grub;
cfg_path = "${ccfg.custom_config_key}".boot.grub;
cfg = config.${cfg_path};
in
with lib;
{
options.${ccfg.custom_config_key}.boot.grub = {
enable = mkEnableOption "Grub bootloader";
device = mkOption {
type = types.str;
enable = lib.mkEnableOption "Grub bootloader";
device = lib.mkOption {
type = lib.types.str;
default = "/dev/sda";
description = ''
The device to install GRUB on.
'';
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
boot.loader.grub = {
enable = true;
device = cfg.device;