Use WhiteSur ultrawide GRUB theme
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myModules.bootloaders.grubWindows;
|
||||
cfg = config.myModules.bootloaders.grub;
|
||||
systemdBootCfg = config.myModules.bootloaders.systemdBoot;
|
||||
in {
|
||||
options.myModules.bootloaders.grubWindows = {
|
||||
enable = lib.mkEnableOption "GRUB with Windows chainloading support";
|
||||
options.myModules.bootloaders.grub = {
|
||||
enable = lib.mkEnableOption "GRUB bootloader support";
|
||||
|
||||
configurationLimit = lib.mkOption {
|
||||
default = 5;
|
||||
@@ -24,6 +24,18 @@ in {
|
||||
entries discovered by os-prober.
|
||||
'';
|
||||
};
|
||||
|
||||
theme = lib.mkOption {
|
||||
default = null;
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "GRUB theme directory.";
|
||||
};
|
||||
|
||||
gfxmode = lib.mkOption {
|
||||
default = "auto";
|
||||
type = lib.types.str;
|
||||
description = "GRUB graphical mode used for EFI and BIOS.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -31,14 +43,14 @@ in {
|
||||
{
|
||||
assertion = !systemdBootCfg.enable;
|
||||
message = ''
|
||||
myModules.bootloaders.grubWindows.enable conflicts with
|
||||
myModules.bootloaders.grub.enable conflicts with
|
||||
myModules.bootloaders.systemdBoot.enable. Disable systemdBoot before
|
||||
enabling the GRUB Windows boot strategy.
|
||||
enabling the GRUB boot strategy.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = builtins.hasAttr "/boot" config.fileSystems;
|
||||
message = "The GRUB Windows boot strategy expects an EFI filesystem mounted at /boot.";
|
||||
message = "The GRUB boot strategy expects an EFI filesystem mounted at /boot.";
|
||||
}
|
||||
];
|
||||
|
||||
@@ -55,6 +67,9 @@ in {
|
||||
useOSProber = true;
|
||||
configurationLimit = cfg.configurationLimit;
|
||||
timeoutStyle = "menu";
|
||||
theme = lib.mkIf (cfg.theme != null) (lib.mkDefault cfg.theme);
|
||||
gfxmodeEfi = lib.mkDefault cfg.gfxmode;
|
||||
gfxmodeBios = lib.mkDefault cfg.gfxmode;
|
||||
extraEntries = lib.optionalString (cfg.windowsEfiUuid != null) ''
|
||||
menuentry "Windows Boot Manager" {
|
||||
insmod part_gpt
|
||||
@@ -7,7 +7,7 @@
|
||||
./android.nix
|
||||
./base.nix
|
||||
./ben.nix
|
||||
./bootloaders/grub-windows.nix
|
||||
./bootloaders/grub.nix
|
||||
./bootloaders/systemd-boot.nix
|
||||
./cache-server.nix
|
||||
./cache.nix
|
||||
|
||||
21
nixos/flake.lock
generated
21
nixos/flake.lock
generated
@@ -594,6 +594,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"grub2-themes": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757136219,
|
||||
"narHash": "sha256-tKU+vq34KHu/A2wD7WdgP5A4/RCmSD8hB0TyQAUlixA=",
|
||||
"owner": "vinceliuice",
|
||||
"repo": "grub2-themes",
|
||||
"rev": "80dd04ddf3ba7b284a7b1a5df2b1e95ee2aad606",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vinceliuice",
|
||||
"repo": "grub2-themes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
@@ -1678,6 +1698,7 @@
|
||||
"git-blame-rank": "git-blame-rank",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"git-sync-rs": "git-sync-rs",
|
||||
"grub2-themes": "grub2-themes",
|
||||
"home-manager": "home-manager",
|
||||
"hypr-workspace-history": "hypr-workspace-history",
|
||||
"hyprNStack": "hyprNStack",
|
||||
|
||||
@@ -236,6 +236,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
grub2-themes = {
|
||||
url = "github:vinceliuice/grub2-themes";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.grub2-themes.nixosModules.default
|
||||
../configuration.nix
|
||||
../nixified.ai.nix
|
||||
];
|
||||
@@ -41,9 +43,16 @@
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
myModules.bootloaders.systemdBoot.enable = false;
|
||||
myModules.bootloaders.grubWindows = {
|
||||
myModules.bootloaders.grub = {
|
||||
enable = true;
|
||||
windowsEfiUuid = "B270-C7E6";
|
||||
gfxmode = "3440x1440,auto";
|
||||
};
|
||||
boot.loader.grub2-theme = {
|
||||
enable = true;
|
||||
theme = "whitesur";
|
||||
icon = "whitesur";
|
||||
screen = "ultrawide2k";
|
||||
};
|
||||
|
||||
networking.hostName = "ryzen-shine";
|
||||
|
||||
@@ -16,7 +16,7 @@ makeEnable config "myModules.raspberry-pi" false {
|
||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
||||
# hardware.raspberry-pi."4".audio.enable = true;
|
||||
myModules.bootloaders.systemdBoot.enable = false;
|
||||
myModules.bootloaders.grubWindows.enable = false;
|
||||
myModules.bootloaders.grub.enable = false;
|
||||
|
||||
boot = {
|
||||
initrd.systemd.tpm2.enable = false;
|
||||
|
||||
@@ -13,7 +13,7 @@ makeEnable config "myModules.wsl" false {
|
||||
myModules.base.enable = false;
|
||||
myModules.desktop.enable = false;
|
||||
myModules.bootloaders.systemdBoot.enable = false;
|
||||
myModules.bootloaders.grubWindows.enable = false;
|
||||
myModules.bootloaders.grub.enable = false;
|
||||
myModules.xmonad.enable = false;
|
||||
myModules.plasma.enable = false;
|
||||
# Tailscale-in-WSL is usually better handled by the Windows host Tailscale
|
||||
|
||||
Reference in New Issue
Block a user