1
0
Fork 0
mirror of https://github.com/NixOS/nixos-artwork synced 2024-10-18 14:32:43 -04:00
nixos-artwork/gnome/default.nix
Samuel Dionne-Riel 783c38b22d Adds variant of nix-wallpaper-simple-dark-gray...
It has the same metrics as Gnome_Dark had with regards to logo
positioning, making it a drop-in replacement.

The source has been kept (.xcf), if any modifications are needed.
2018-08-28 21:56:56 -04:00

44 lines
1.1 KiB
Nix

{ pkgs }:
rec {
mkBackgroundProperties = { backgroundName, backgroundFile }:
pkgs.substituteAll {
name = "${backgroundName}.xml";
src = ./share/gnome-background-properties/template.xml.in;
inherit backgroundName backgroundFile;
};
mkBackgroundOverride = { name, background }:
pkgs.writeTextFile {
inherit name;
destination = "/share/gsettings-schemas/${name}/org.gnome.desktop.background.nixos.gschema.override";
text = ''
[org.gnome.desktop.background]
picture-uri='file://${background}'
'';
};
mkBackground = { backgroundName, backgroundFile }: rec {
properties = mkBackgroundProperties {
inherit backgroundName backgroundFile;
};
gsettings = mkBackgroundOverride {
name = "nixos-${backgroundName}-background";
background = properties;
};
};
# Compatibility with previous attribute.
gnomeDark = nix-wallpaper-simple-dark-gray-bottom;
nix-wallpaper-simple-dark-gray-bottom = mkBackground {
backgroundName = "nixos-dark";
backgroundFile = ../wallpapers/nix-wallpaper-simple-dark-gray_bottom.png;
};
}