Howto change the darkmode wallpapers in Gnome

To change the darkmode wallpapers you need to make two same (png) wallpapers with different names.

the first wallpaper nix-wallpaper-simple-dark-gray.png

the second wallpaper bzjd66sdi85rwj7kd3zcdsi52xzhx69c-nix-wallpaper-simple-dark-gray.png

Then go to your directory of the wallpapers in the terminal

sudo unshare -m bash

mount -o remount, rw /nix/store
sudo cp nix-wallpaper-simple-dark-gray.png /nix/store/qhhkqmm0vjvf7dgghlp6xg1j6lcwmgn4-simple-dark-gray-2016-02-19/share/wallpapers/simple-dark-gray/contents/images/nix-wallpaper-simple-dark-gray.png

sudo cp bzjd66sdi85rwj7kd3zcdsi52xzhx69c-nix-wallpaper-simple-dark-gray.png /nix/store/bzjd66sdi85rwj7kd3zcdsi52xzhx69c-nix-wallpaper-simple-dark-gray.png

exit

Now the wallpapers are changed no need for rebuild.

This is not how you should do this… Manually editing the nix store is never the correct solution.

thanks for your reply .

Im aware its not the right way , but it works fine no errors . i have test it on my machine works every time :slight_smile:

Sorry, I should have explained more thoroughly.

The whole idea of nix/os is that the system resolves paths internally. Changing a wallpaper declaratively should be done by pointing to a file in your configuration. NixOS then will copy this file to the store, and point a symlink to it.

At best, this will just break quietly when the hash changes because a dependency of gnome updates, and at worst it will corrupt your nix store and brick your machine.

You should never ever manually edit the nix store!!!

To expand on this: you may not see any issues at first, but during the period of time where the nix store is mounted read/write, other programs (that are badly written and expect to be able to modify files where their program is installed) can silently edit files in the nix store and cause issues with your system. You also open yourself up for user error, obviously.

This method is like using a hammer to put a screw in your wall - hammers are for nails, not screws, even if the screw happens to go in - and is misinformation. Use the tools for the purpose that they are designed for.

To that end, I don’t use gnome, but someone else seems to have figured this out already:

Im did test the store for faults , and did not replace my images that i put in the store.

Thats for me save a enough .

Is the Nix way not straightforward? Do you do anything the Nix way? Will you do the next thing the Nix way? Nix was meant to be an alternative to such mutative workflows as the one you’re suggesting. And has been somewhat successful in that.