dconf: note that system dconf must be enabled

Before enabling dconf in Home Manager, dconf must be enabled in system
config.

Otherwise it will fail like this:

```
$ home-manager switch
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating dconfSettings
error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found.
```
This commit is contained in:
Farseen 2022-03-26 13:19:31 +05:30 committed by Robert Helgesson
parent ac94041153
commit 8afee75d0d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 15 additions and 2 deletions

View file

@ -91,14 +91,22 @@ while the `common.nix` file contains configuration shared across the two logins.
You can get some inspiration from the {post-your-homenix}[Post your home-manager home.nix file!] Reddit thread.
=== Why do I get an error message about `ca.desrt.dconf`?
=== Why do I get an error message about `ca.desrt.dconf` or `dconf.service`?
You are most likely trying to configure the GTK or Gnome Terminal but the DBus session is not aware of the dconf service. The full error you might get is
You are most likely trying to configure something that uses dconf
but the DBus session is not aware of the dconf service.
The full error you might get is
----
error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
----
or
----
error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dconf.service not found.
----
The solution on NixOS is to add
[source,nix]

View file

@ -21,6 +21,11 @@ in {
visible = false;
description = ''
Whether to enable dconf settings.
</para><para>
Note, if you use NixOS then you must add
<code>programs.dconf.enable = true</code>
to your system configuration. Otherwise you will see a systemd error
message when your configuration is activated.
'';
};