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