refactor for preparation of flake based systems
This commit is contained in:
parent
6527f67145
commit
25e9d06354
121 changed files with 449 additions and 40 deletions
31
modules_old/boot/grub.nix
Normal file
31
modules_old/boot/grub.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "boot_grub";
|
||||
cfg = config.mods.${name};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mods.${name} = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable ${name}");
|
||||
device = mkOption {
|
||||
type = types.str;
|
||||
default = "/dev/sda";
|
||||
description = ''
|
||||
The device to install GRUB on.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = cfg.device;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue