summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-28 23:55:00 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2018-08-29 00:04:58 -0400
commit01259ef98f9789b722360aa9295e8c7eedaf103f (patch)
treed8df7f6a0392044665abdd68b35e583f3a2514db /nixos/modules/system/boot/loader/grub
parente8406f937ef583f6d80916912a2b04b55f9b627b (diff)
downloadnixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar.gz
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar.bz2
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar.lz
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar.xz
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.tar.zst
nixlib-01259ef98f9789b722360aa9295e8c7eedaf103f.zip
nixos/grub: Uses the new artwork as the default option.
This also includes a set of defaults *for this option*, where when not
used, other saner defaults are used.
Diffstat (limited to 'nixos/modules/system/boot/loader/grub')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index a9c5e8e30d32..3a33b3f65d36 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -82,6 +82,8 @@ let
                "--output" "$out"
              ] ++ (optional (cfg.fontSize!=null) "--size ${toString cfg.fontSize}")))
          );
+
+  defaultSplash = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bootloader}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bootloader.png";
 in
 
 {
@@ -558,9 +560,14 @@ in
           sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
         }
         # GRUB 1.97 doesn't support gzipped XPMs.
-        else "${pkgs.nixos-artwork.wallpapers.gnome-dark}/share/artwork/gnome/Gnome_Dark.png");
+        else defaultSplash);
     }
 
+    (mkIf (cfg.splashImage == defaultSplash) {
+      boot.loader.grub.backgroundColor = mkDefault "#2F302F";
+      boot.loader.grub.splashMode = mkDefault "normal";
+    })
+
     (mkIf cfg.enable {
 
       boot.loader.grub.devices = optional (cfg.device != "") cfg.device;