Wallpapers for Wayland
Appearance
⤟︎
This article is a candidate for merging with Wayland. Further information may be found in the relevant discussion page.
Home Manager offers several different ways to set wallpaper in Wayland.
Declarative Wallpapers
fetchurl can be used to declaratively set wallpapers. In this example, a wallpaper in nixos-artwork is used.
❄︎ ~/.config/home-manager/home.nix
let
src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/8957e93c95867faafec7f9988cedddd6837859fa/wallpapers/nix-wallpaper-binary-black.png";
hash = "sha256-mhSh0wz2ntH/kri3PF5ZrFykjjdQLhmlIlDDGFQIYWw=";
};
in
Use 📖︎ nix-prefetch-url to get the hash:
$ nix hash convert --hash-algo sha256 $(nix-prefetch-url https://raw.githubusercontent.com/NixOS/nixos-artwork/8957e93c95867faafec7f9988cedddd6837859fa/wallpapers/nix-wallpaper-binary-black.png)
sha256-mhSh0wz2ntH/kri3PF5ZrFykjjdQLhmlIlDDGFQIYWw=
Configuration
wpaperd
wpaperd is a modern wallpaper daemon for Wayland. It has Home Manager integration and can be configured as follows:
❄︎ ~/.config/home-manager/home.nix
services.wpaperd.enable = true;
services.wpaperd.settings = {
eDP-1 = {
path = src;
};
};
See https://github.com/danyspin97/wpaperd#wallpaper-configuration for the full list of options.