Jump to content

Wallpapers for Wayland: Difference between revisions

From Official NixOS Wiki
34j (talk | contribs)
Add Wallpapers for Wayland
 
Cktiel (talk | contribs)
wpaperd: cleanup
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Merge|Wayland|scope=article}}
[[Home Manager]] offers several different ways to set wallpaper in Wayland.
[[Home Manager]] offers several different ways to set wallpaper in Wayland.


Line 27: Line 29:
[https://github.com/danyspin97/wpaperd wpaperd] is a modern wallpaper daemon for Wayland. It has [[Home Manager]] integration and can be configured as follows:
[https://github.com/danyspin97/wpaperd wpaperd] is a modern wallpaper daemon for Wayland. It has [[Home Manager]] integration and can be configured as follows:


{{file|~/.config/home-manager/home.nix|nix|3=
{{file|3=
services.wpaperd.enable = true;
services.wpaperd =  {
services.wpaperd.settings = {
  enable = true;
  eDP-1 = {
  settings = {
    path = src;
    eDP-1 = {
      path = src;
    };
   };
   };
};
};
}}
|name=~/.config/home-manager/home.nix|lang=nix}}


See https://github.com/danyspin97/wpaperd#wallpaper-configuration for the full list of options.
See https://github.com/danyspin97/wpaperd#wallpaper-configuration for the full list of options.

Latest revision as of 04:32, 31 July 2026

⤟︎
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;
  settings = {
    eDP-1 = {
      path = src;
    };
  };
};

See https://github.com/danyspin97/wpaperd#wallpaper-configuration for the full list of options.