WIP refactor
This commit is contained in:
parent
a5c14dc701
commit
4b1bf541cf
6 changed files with 95 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue