I am trying to configure my gnome3 desktop from configuration.nix.
In particular, I would like to set the theme and the background image. I guess that if this works, then I can do more
but it doesnāt seem to have any effect after nixos-rebuild switch.
When I dump the configuration with dconf it still shows the āoldā background image.
Can anyone explain me how to configure gnome3 from configuration.nix?
Oh, awesome! It means that my settings are going to be applied when I configure the machine for the first time, right?
What would be the way of testing it? Nuke something from my home directory?
You can use dconf Editor (gnome3.dconf-editor) to easily nuke individual settings to test.
As an alternative, you can also use home-managerās dconf.settings module (docs); this is per-user, but will actually reset existing keys when you run home-manager switch. home-managercan be integrated into your configuration.nix as a module; I presume that things like dconf.settings work similarly in this case, but Iāve never used the module functionality myself so Iām not 100% sure.
FWIW, using home-managerās dconf.settings module to configure Pantheon is exactly how I handle things. Hereās the relevant file from my ādotfilesā (that repo is a bit of a work-in-progress right now).
The only problem Iāve run into is that /org/gnome/settings-daemon/plugins/color/night-light-temperature expects an unsigned 32-bit INT, but home-manager inserts a signed 32-bit INTā¦ Which then gets promptly ignored. But as you can tell from the path, this is actually a GNOME component that Pantheonās re-using, and the deficiency is technically in home-manager anyway (Iāve run into a few other similar issues).
Thank you! I have basically every dcofig setting working after looking at your configs. However, I canāt get the āmiller_columnsā configuration to work (the three column view in Files).
A lot of per-application schemas on NixOS show the No schema found note. I think this is because of how Nix handles applications files, and Iāve rarely run into any problems this approach causes (though thismight be an exception).
I did some experimentation around the default-viewmode for Files, and can reproduce your issue. It looks like the reason for this is that setting default-viewmode isnāt sufficient in and of itself; tab-info-list also needs to be set (you can see this second key change after switching the view mode in Files and then closing the window). Digging around in Filesā¦ wellā¦ files reveals that tab-info-list is a tuple with the following schema:
<key type="a(uss)" name="tab-info-list">
<summary>Details of open tabs</summary>
<default>[(0,'','')]</default>
<description>Array of tab info: View mode, root uri, tip uri (for Miller view)</description>
</key>
The āview modeā here corresponds to 0 for the icon view, 1 for the list view, and 2 for miller_columns. The two strings are of the form file:///path/to/directory, with the second string being empty for the icon and list views.
Unfortunately, home-manager canāt yet set dconf tuples (though thereās a pull request open to add this functionality), so it doesnāt look like Fileās view mode can be fully set yet.