better boot
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ config, pkgs, host, inputs, ... }:
|
||||
let
|
||||
{ config, pkgs, lib, host, inputs, ... }:
|
||||
let
|
||||
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
|
||||
domain = "git.nx2.site";
|
||||
owner = "nx2";
|
||||
@@ -7,48 +7,62 @@
|
||||
rev = "0.5.0";
|
||||
hash = "sha256-e+55NYsSsWY6GPbYUtdVEB9krueuCAWT3Ce/Ghops1g=";
|
||||
});
|
||||
in
|
||||
in
|
||||
{
|
||||
imports = if host == "NxNORTH" then [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
] else [];
|
||||
config = if host == "NxNORTH" then {
|
||||
# I have to boot with secureboot becasue of the chinese spyware called Vanguard
|
||||
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
boot = {
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
loader.systemd-boot.enable = false; # let lanzaboote install systemd-boot
|
||||
|
||||
config = if (host == "NxXPS" || host == "NxACE") then {
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
};
|
||||
} else if host == "NxXPS" then {
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
configurationLimit = 30;
|
||||
device = "nodev";
|
||||
# useOSProber = true;
|
||||
efiSupport = true;
|
||||
#theme = grub-theme-ascii-diana;
|
||||
#font = "${grub-theme-ascii-diana}/unicode.pf2";
|
||||
theme = grub-theme-ascii-diana;
|
||||
font = "${grub-theme-ascii-diana}/unicode.pf2";
|
||||
fontSize = 50;
|
||||
# splashImage = null;
|
||||
|
||||
extraEntries = if host == "NxXPS" then ''
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
efi.canTouchEfiVariables = true;
|
||||
extraEntries = ''
|
||||
menuentry 'Windows 11' --class windows --class os $menuentry_id_option 'osprober-efi-0A97-7A2D' {
|
||||
insmod part_gpt
|
||||
insmod fat
|
||||
search --no-floppy --fs-uuid --set=root 0A97-7A2D
|
||||
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
||||
}
|
||||
'' else '''';
|
||||
'';
|
||||
};
|
||||
} else {
|
||||
# I have to boot with secureboot becasue of the chinese spyware called Vanguard
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
boot = {
|
||||
lanzaboote = {
|
||||
} else { # NxACE
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
# let lanzaboote install systemd-boot
|
||||
loader.systemd-boot.enable = false;
|
||||
configurationLimit = 30;
|
||||
device = "nodev";
|
||||
# useOSProber = true;
|
||||
efiSupport = true;
|
||||
fontSize = 50;
|
||||
efi.canTouchEfiVariables = true;
|
||||
splashImage = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user