30 lines
496 B
Nix
30 lines
496 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_latest;
|
|
loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
};
|
|
|
|
services.fstrim = enabled;
|
|
};
|
|
}
|