How can I set the background for Cinnamon?

How can I set the desktop background on a Cinnamon desktop?

From all the posts I’ve read, this should work

    dconf.enable = true;

    dconf.settings = {
      "org/gnome/desktop/background" = {
        color-shading-type = "solid";
        picture-options = "zoom";
        picture-uri = "/home/cafe/win-13.jpg";
      };
    };



If not that, this atleast should work

    home.file.".background-image".source = config.lib.file.mkOutOfStoreSymlink /home/cafe/win-13.jpg;

, but I find that none of this works.

You can find what dconf settings is changed by running dconf watch / in the terminal and changing stuff in the UI

You need to add a file:// suffix and it’s org/cinammon not org/gnome

The correct configuration should be:

    dconf.settings = {
      "org/cinnamon/desktop/background" = {
        picture-uri = "file:///home/cafe/win-13.jpg";
      };
    };

you can also use a Nix path instead of hardcoding:

  "org/cinnamon/desktop/background" = {
    picture-uri = "file://" + ./wallpaper/win-13.jpg;
  };