nixos-config/modules/nixos/system/boot/default.nix

30 lines
494 B
Nix

{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.boot;
in
{
options.${namespace}.system.boot = with types; {
enable = mkBoolOpt false "Whether or not to enable booting.";
};
config = mkIf cfg.enable {
boot = {
kernelPackages = pkgs.linuxPackages_6_12;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
services.fstrim = enabled;
};
}