split boot module

This commit is contained in:
Gerg-L 2024-12-07 13:09:29 -05:00
parent 1cfe7ab312
commit 49283fab73
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
2 changed files with 52 additions and 36 deletions

41
modules/boot/other.nix Normal file
View file

@ -0,0 +1,41 @@
{
lib,
self',
pkgs,
config,
}:
{
options.local.bootConfig.disable = lib.mkEnableOption "";
config = lib.mkIf (!config.local.bootConfig.disable) {
boot = {
loader = {
grub.configurationLimit = 10;
systemd-boot = {
configurationLimit = 10;
enable = lib.mkDefault true;
consoleMode = "max";
editor = false;
};
efi.canTouchEfiVariables = lib.mkDefault true;
};
plymouth = {
enable = lib.mkDefault true;
theme = "breeze";
logo = "${self'.packages.images}/logo.png";
};
};
systemd.services.efibootmgr = {
reloadIfChanged = false;
restartIfChanged = false;
stopIfChanged = false;
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${lib.getExe' pkgs.efibootmgr "efibootmgr"} -t 0";
Type = "oneshot";
RemainAfterExit = true;
};
};
};
}