Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes old logo use by changing the backgrounds used #45731

Merged
merged 3 commits into from
Sep 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions nixos/modules/services/x11/desktop-managers/gnome3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/display-managers/lightdm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';
Expand Down
36 changes: 35 additions & 1 deletion nixos/modules/system/boot/loader/grub/grub.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
Expand Down Expand Up @@ -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

{
Expand Down Expand Up @@ -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.

<note><para>
This options has no effect for GRUB 1.
</para></note>
'';
};

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.

<note><para>
This options has no effect for GRUB 1.
</para></note>
'';
};

font = mkOption {
type = types.nullOr types.path;
default = "${realGrub}/share/grub/unicode.pf2";
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 8 additions & 1 deletion nixos/modules/system/boot/loader/grub/install-grub.pl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ sub runCommand {
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"));
Expand Down Expand Up @@ -307,10 +309,15 @@ sub GrubFs {
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
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/installer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 20 additions & 9 deletions pkgs/data/misc/nixos-artwork/wallpapers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down