I created a NixOS config that automatically installs wallpapers to /run/current-system/sw/share/backgrounds using code like this:
wallpapersPackage = pkgs.runCommand "system-wallpapers" { } ''
mkdir -p $out/share/backgrounds/dark
${lib.concatMapStringsSep "\n" (w: "cp ${w.src} $out/share/backgrounds/dark") wallpapers}
ln -s $out/share/backgrounds/dark/* $out/share/backgrounds
'';
(and similar code for the light images).
And it works until I remove this line from my config:
services.desktopManager.gnome.enable = true;
But why? Isn’t this code supposed to create the backgrounds directory automatically? I though mkdir -p $out/share/backgrounds/dark should do exactly that.