1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

Merge #45731: artwork update (replacing old logo)

This commit is contained in:
Vladimír Čunát 2018-08-30 22:48:36 +02:00
commit 0473466ba5
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
6 changed files with 67 additions and 15 deletions

View file

@ -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

View file

@ -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.
'';

View file

@ -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.
<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";
@ -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;

View file

@ -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

View file

@ -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

View file

@ -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";