1
0
Fork 0

chore: Move bootloader into options

This commit is contained in:
lwad 2024-03-15 11:16:41 +00:00
parent d7c4daaea7
commit 68cc2b826e
5 changed files with 29 additions and 26 deletions

View File

@ -1,13 +1,7 @@
{ config, lib, modulesPath, pkgs, ... }:
{
boot = {
kernelParams = [ "boot.shell_on_fail" ];
loader = {
grub.enable = false;
systemd-boot.enable = lib.mkForce false;
};
};
boot.kernelParams = [ "boot.shell_on_fail" ];
home-manager.users.${config.lwad.definitions.username} = {
home.stateVersion = "23.05";
programs.librewolf.settings."network.trr.mode" = lib.mkForce 0;
@ -16,7 +10,9 @@
"${modulesPath}/virtualisation/qemu-vm.nix"
"${modulesPath}/profiles/qemu-guest.nix"
../components/desktop-environment.nix
../lwad
];
lwad.bootLoader.enable = false;
networking.hostName = "asuna";
programs = {
bash.shellAliases = let

View File

@ -1,17 +0,0 @@
{ ... }:
{
boot = {
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
systemd-boot = {
editor = false;
enable = true;
};
timeout = 2;
};
};
}

View File

@ -104,7 +104,7 @@ in {
};
};
};
imports = [ ./components/bootloader.nix ./lwad ];
imports = [ ./lwad ];
lwad = {
applications = {
btop.enable = true;

24
lwad/bootloader.nix Normal file
View File

@ -0,0 +1,24 @@
{ config, lib, ... }:
with lib; {
options.lwad.bootLoader.enable = mkOption {
default = true;
description = "Whether to enable systemd-boot.";
type = types.bool;
};
config.boot.loader = let cfg = config.lwad.bootLoader.enable;
in mkMerge (flatten [
(optional cfg {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
systemd-boot = {
editor = false;
enable = true;
};
timeout = 2;
})
{ grub.enable = false; }
]);
}

View File

@ -1,5 +1,5 @@
{ ... }:
{
imports = [ ./applications ./core.nix ./definitions ./development ./utilities ];
imports = [ ./applications ./bootloader.nix ./core.nix ./definitions ./development ./utilities ];
}