Merge pull request #86163 from worldofpeace/wallpaper-refactor
Gnome and Pantheon: install nixos wallpapers
This commit is contained in:
commit
d508591039
@ -37,10 +37,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='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png'
|
||||
picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}'
|
||||
|
||||
[org.gnome.desktop.screensaver]
|
||||
picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png'
|
||||
picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath}'
|
||||
|
||||
[org.gnome.shell]
|
||||
favorite-apps=[ 'org.gnome.Epiphany.desktop', 'org.gnome.Geary.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]
|
||||
@ -320,6 +320,8 @@ in
|
||||
gnome-shell
|
||||
gnome-shell-extensions
|
||||
gnome-themes-extra
|
||||
nixos-artwork.wallpapers.simple-dark-gray
|
||||
nixos-artwork.wallpapers.simple-dark-gray-bottom
|
||||
pkgs.gnome-user-docs
|
||||
pkgs.orca
|
||||
pkgs.glib # for gsettings
|
||||
|
@ -180,6 +180,7 @@ in
|
||||
gtk3.out
|
||||
hicolor-icon-theme
|
||||
lightlocker
|
||||
nixos-artwork.wallpapers.simple-dark-gray
|
||||
onboard
|
||||
qgnomeplatform
|
||||
shared-mime-info
|
||||
|
@ -132,8 +132,9 @@ in
|
||||
};
|
||||
|
||||
background = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/artwork/gnome/nix-wallpaper-simple-dark-gray_bottom.png";
|
||||
type = types.path;
|
||||
# Manual cannot depend on packages, we are actually setting the default in config below.
|
||||
defaultText = "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath";
|
||||
description = ''
|
||||
The background image or color to use.
|
||||
'';
|
||||
@ -212,6 +213,9 @@ in
|
||||
}
|
||||
];
|
||||
|
||||
# Keep in sync with the defaultText value from the option definition.
|
||||
services.xserver.displayManager.lightdm.background = mkDefault pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
|
||||
|
||||
# Set default session in session chooser to a specified values – basically ignore session history.
|
||||
# Auto-login is already covered by a config value.
|
||||
services.xserver.displayManager.job.preStart = optionalString (!cfg.autoLogin.enable && dmcfg.defaultSession != null) ''
|
||||
|
@ -83,7 +83,7 @@ let
|
||||
] ++ (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";
|
||||
defaultSplash = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bootloader.gnomeFilePath;
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -3,12 +3,18 @@
|
||||
let
|
||||
mkNixBackground = { name, src, description }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let
|
||||
pkg = stdenv.mkDerivation {
|
||||
inherit name src;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
# GNOME
|
||||
mkdir -p $out/share/backgrounds/nixos
|
||||
ln -s $src $out/share/backgrounds/nixos/${src.name}
|
||||
|
||||
# TODO: is this path still needed?
|
||||
mkdir -p $out/share/artwork/gnome
|
||||
ln -s $src $out/share/artwork/gnome/${src.name}
|
||||
|
||||
@ -22,6 +28,11 @@ X-KDE-PluginInfo-Name=${name}
|
||||
_EOF
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
gnomeFilePath = "${pkg}/share/backgrounds/nixos/${src.name}";
|
||||
kdeFilePath = "${pkg}/share/wallpapers/${name}/contents/images/${src.name}";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit description;
|
||||
homepage = "https://github.com/NixOS/nixos-artwork";
|
||||
@ -29,6 +40,7 @@ _EOF
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
in pkg;
|
||||
|
||||
in
|
||||
|
||||
|
@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
mesonFlags = [
|
||||
"--sysconfdir=${placeholder "out"}/etc"
|
||||
"-Ddefault-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png"
|
||||
"-Ddefault-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
|
||||
"-Dplank-dockitems=false"
|
||||
];
|
||||
|
||||
|
@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
|
||||
# Needed until https://github.com/elementary/greeter/issues/360 is fixed
|
||||
(substituteAll {
|
||||
src = ./hardcode-fallback-background.patch;
|
||||
default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png";
|
||||
default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
|
||||
})
|
||||
];
|
||||
|
||||
@ -113,7 +113,7 @@ stdenv.mkDerivation rec {
|
||||
# Use NixOS default wallpaper
|
||||
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
|
||||
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" \
|
||||
"default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png"
|
||||
"default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
|
||||
|
||||
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
|
||||
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
|
||||
|
Loading…
Reference in New Issue
Block a user