blob: 926cbd2b4b3f3dc370a183418c81b396e96aba02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.boot.loader.external;
in
{
meta = {
maintainers = with maintainers; [ cole-h grahamc raitobezarius ];
doc = ./external.md;
};
options.boot.loader.external = {
enable = mkEnableOption (lib.mdDoc "use an external tool to install your bootloader");
installHook = mkOption {
type = with types; path;
description = lib.mdDoc ''
The full path to a program of your choosing which performs the bootloader installation process.
The program will be called with an argument pointing to the output of the system's toplevel.
'';
};
};
config = mkIf cfg.enable {
boot.loader = {
grub.enable = mkDefault false;
systemd-boot.enable = mkDefault false;
supportsInitrdSecrets = mkDefault false;
};
system.build.installBootLoader = cfg.installHook;
};
}
|