2014-12-13 11:15:15 -05:00
|
|
|
{ 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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-28 21:55:56 -04:00
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
|
2014-12-13 11:15:15 -05:00
|
|
|
}
|