mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-18 07:29:23 +03:00

these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
36 lines
874 B
Nix
36 lines
874 B
Nix
{ 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 "using an external tool to install your bootloader";
|
|
|
|
installHook = mkOption {
|
|
type = with types; path;
|
|
description = ''
|
|
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;
|
|
};
|
|
}
|