diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index c339d24b098..6a110f2a55c 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -33,10 +33,10 @@ let
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
[org.gnome.desktop.background]
- picture-uri='${pkgs.nixos-artwork.wallpapers.gnome-dark}/share/artwork/gnome/Gnome_Dark.png'
+ picture-uri='${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png'
[org.gnome.desktop.screensaver]
- picture-uri='${pkgs.nixos-artwork.wallpapers.gnome-dark}/share/artwork/gnome/Gnome_Dark.png'
+ picture-uri='${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png'
${cfg.extraGSettingsOverrides}
EOF
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix
index dc82f7086c8..f0e13f6ed2f 100644
--- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -115,7 +115,7 @@ in
background = mkOption {
type = types.str;
- default = "${pkgs.nixos-artwork.wallpapers.gnome-dark}/share/artwork/gnome/Gnome_Dark.png";
+ default = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png";
description = ''
The background image or color to use.
'';
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 42da6585722..3a33b3f65d3 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -38,6 +38,8 @@ let
in
pkgs.writeText "grub-config.xml" (builtins.toXML
{ splashImage = f cfg.splashImage;
+ splashMode = f cfg.splashMode;
+ backgroundColor = f cfg.backgroundColor;
grub = f grub;
grubTarget = f (grub.grubTarget or "");
shell = "${pkgs.runtimeShell}";
@@ -80,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
{
@@ -328,6 +332,31 @@ in
'';
};
+ backgroundColor = mkOption {
+ type = types.nullOr types.string;
+ example = "#7EBAE4";
+ default = null;
+ description = ''
+ Background color to be used for GRUB to fill the areas the image isn't filling.
+
+
+ This options has no effect for GRUB 1.
+
+ '';
+ };
+
+ splashMode = mkOption {
+ type = types.enum [ "normal" "stretch" ];
+ default = "stretch";
+ description = ''
+ Whether to stretch the image or show the image in the top-left corner unstretched.
+
+
+ This options has no effect for GRUB 1.
+
+ '';
+ };
+
font = mkOption {
type = types.nullOr types.path;
default = "${realGrub}/share/grub/unicode.pf2";
@@ -531,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;
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
index d1ff6e6bf52..ea6e56892cb 100644
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -51,6 +51,8 @@ my $extraEntries = get("extraEntries");
my $extraEntriesBeforeNixOS = get("extraEntriesBeforeNixOS") eq "true";
my $extraInitrd = get("extraInitrd");
my $splashImage = get("splashImage");
+my $splashMode = get("splashMode");
+my $backgroundColor = get("backgroundColor");
my $configurationLimit = int(get("configurationLimit"));
my $copyKernels = get("copyKernels") eq "true";
my $timeout = int(get("timeout"));
@@ -307,10 +309,15 @@ else {
if ($suffix eq ".jpg") {
$suffix = ".jpeg";
}
+ if ($backgroundColor) {
+ $conf .= "
+ background_color '$backgroundColor'
+ ";
+ }
copy $splashImage, "$bootPath/background$suffix" or die "cannot copy $splashImage to $bootPath\n";
$conf .= "
insmod " . substr($suffix, 1) . "
- if background_image " . $grubBoot->path . "/background$suffix; then
+ if background_image --mode '$splashMode' " . $grubBoot->path . "/background$suffix; then
set color_normal=white/black
set color_highlight=black/white
else
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 507665190a2..1e266b3b546 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -237,7 +237,7 @@ let
docbook_xsl_ns
unionfs-fuse
ntp
- nixos-artwork.wallpapers.gnome-dark
+ nixos-artwork.wallpapers.simple-dark-gray-bottom
perlPackages.XMLLibXML
perlPackages.ListCompare
xorg.lndir
diff --git a/pkgs/data/misc/nixos-artwork/wallpapers.nix b/pkgs/data/misc/nixos-artwork/wallpapers.nix
index 3a65a9626d1..648b4f1dd96 100644
--- a/pkgs/data/misc/nixos-artwork/wallpapers.nix
+++ b/pkgs/data/misc/nixos-artwork/wallpapers.nix
@@ -23,16 +23,9 @@ let
in
-{
+rec {
- gnome-dark = mkNixBackground {
- name = "gnome-dark-2015-02-27";
- description = "Gnome Dark background for Nix";
- src = fetchurl {
- url = https://raw.githubusercontent.com/NixOS/nixos-artwork/7ece5356398db14b5513392be4b31f8aedbb85a2/gnome/Gnome_Dark.png;
- sha256 = "0c7sl9k4zdjwvdz3nhlm8i4qv4cjr0qagalaa1a438jigixx27l7";
- };
- };
+ gnome-dark = simple-dark-gray-bottom;
mosaic-blue = mkNixBackground {
name = "mosaic-blue-2016-02-19";
@@ -61,6 +54,24 @@ in
};
};
+ simple-dark-gray-bootloader = mkNixBackground {
+ name = "simple-dark-gray-bootloader-2018-08-28";
+ description = "Simple dark gray background for NixOS, specifically bootloaders.";
+ src = fetchurl {
+ url = https://raw.githubusercontent.com/NixOS/nixos-artwork/9d1f11f652ed5ffe460b6c602fbfe2e7e9a08dff/bootloader/nix-wallpaper-simple-dark-gray_bootloader.png;
+ sha256 = "0v26kfydn7alr81f2qpgsqdiq2zk7yrwlgibx2j7k91z9h47dpj9";
+ };
+ };
+
+ simple-dark-gray-bottom = mkNixBackground {
+ name = "simple-dark-gray-2018-08-28";
+ description = "Simple dark gray background for NixOS, specifically bootloaders and graphical login.";
+ src = fetchurl {
+ url = https://raw.githubusercontent.com/NixOS/nixos-artwork/783c38b22de09f6ee33aacc817470a4513392d83/wallpapers/nix-wallpaper-simple-dark-gray_bottom.png;
+ sha256 = "13hi4jwp5ga06dpdw5l03b4znwn58fdjlkqjkg824isqsxzv6k15";
+ };
+ };
+
simple-light-gray = mkNixBackground {
name = "simple-light-gray-2016-02-19";
description = "Simple light gray background for Nix";