mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-24 10:10:37 +03:00

After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev 57b193d8dd
result/bin/apply-formatting $NIXPKGS_PATH
45 lines
904 B
Nix
45 lines
904 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;
|
|
};
|
|
}
|