mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-12-25 07:25:35 +01:00
Update flake.nix to fix a bug
ERROR: Unrecognized screen variant 'custom'.
This commit is contained in:
parent
7cff52a245
commit
9aa7e35d71
10
flake.nix
10
flake.nix
@ -26,7 +26,7 @@
|
|||||||
"2k" = "2560x1440";
|
"2k" = "2560x1440";
|
||||||
"4k" = "3840x2160";
|
"4k" = "3840x2160";
|
||||||
"ultrawide2k" = "3440x1440";
|
"ultrawide2k" = "3440x1440";
|
||||||
} // (if cfg.customResolution != null then { "custom" = cfg.customResolution; } else {});
|
};
|
||||||
grub2-theme = pkgs.stdenv.mkDerivation {
|
grub2-theme = pkgs.stdenv.mkDerivation {
|
||||||
name = "grub2-theme";
|
name = "grub2-theme";
|
||||||
src = "${self}";
|
src = "${self}";
|
||||||
@ -36,7 +36,8 @@
|
|||||||
--generate $out/grub/themes \
|
--generate $out/grub/themes \
|
||||||
--screen ${cfg.screen} \
|
--screen ${cfg.screen} \
|
||||||
--theme ${cfg.theme} \
|
--theme ${cfg.theme} \
|
||||||
--icon ${cfg.icon};
|
--icon ${cfg.icon} \
|
||||||
|
${if cfg.customResolution != null then "--custom-resolution ${cfg.customResolution}" else ""}
|
||||||
|
|
||||||
if [ -n "${splashImage}" ]; then
|
if [ -n "${splashImage}" ]; then
|
||||||
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
@ -95,9 +96,9 @@
|
|||||||
screen = mkOption {
|
screen = mkOption {
|
||||||
default = "1080p";
|
default = "1080p";
|
||||||
example = "1080p";
|
example = "1080p";
|
||||||
type = types.enum ([ "1080p" "2k" "4k" "ultrawide" "ultrawide2k" ] ++ (if cfg.customResolution != null then [ "custom" ] else []));
|
type = types.enum [ "1080p" "2k" "4k" "ultrawide" "ultrawide2k" ];
|
||||||
description = ''
|
description = ''
|
||||||
The screen resolution to use for grub2. Use "custom" if you've set a customResolution.
|
The screen resolution to use for grub2.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
customResolution = mkOption {
|
customResolution = mkOption {
|
||||||
@ -106,6 +107,7 @@
|
|||||||
type = types.nullOr (types.strMatching "[0-9]+x[0-9]+");
|
type = types.nullOr (types.strMatching "[0-9]+x[0-9]+");
|
||||||
description = ''
|
description = ''
|
||||||
Custom resolution for grub2 theme. Should be in the format "WIDTHxHEIGHT".
|
Custom resolution for grub2 theme. Should be in the format "WIDTHxHEIGHT".
|
||||||
|
If set, this will override the 'screen' option.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
splashImage = mkOption {
|
splashImage = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user