Specify desktop background under GNOME using home manager

I’ve been looking through home manager options here but I cannot see an option to set my desktop wallpaper under GNOME. Is there one I’ve missed?

You need to set it via dconf.setting. An example how it is done can be found in Stylix: stylix/modules/gnome/hm.nix at b00c9f46ae6c27074d24d2db390f0ac5ebcc329f · danth/stylix · GitHub

If I’m honest, that file just confused me more. I am still getting my bearings with the Nix language. I have tried adding a dconf.settings to home manager and I get the build error:

rror: The option `dconf' does not exist. Definition values:
       - In `/home/fusion809/NixOS-configs/home-manager.nix':
           {
             settings = {
               "org/gnome/desktop/background" = {
                 color-shading-type = "solid";
                 picture-uri = "file://run/current-system/sw/share/backgrounds/Photo of Valley.jpg";
           ...

I would include the code I was using to incorporate it, but the error kind of showed you the code.

Oops, maybe pull the breaks on this error as I think it’s related to the gtk.cursorTheme issue I have. It seems like whatever option is listed last in home-manager.nix is going to give this error until whatever is happening there is fixed.

Now with that issue fixed, this dconf.settings:

  dconf.settings = {
    "org/gnome/desktop/background" = {
      color-shading-type = "solid";
        picture-uri = "file://run/current-system/sw/share/backgrounds/Photo of Valley.jpg";
        };
    };

builds without error but does not set the background to this specified pic. How do I fix this issue?

Ah, issue was that I was using GNOME’s dark theme, so I needed to set picture-uri-dark instead.