From 8afee75d0d1cb054cfeddfdc9f7193adc7741c95 Mon Sep 17 00:00:00 2001 From: Farseen Date: Sat, 26 Mar 2022 13:19:31 +0530 Subject: [PATCH] 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. ``` --- docs/faq.adoc | 12 ++++++++++-- modules/misc/dconf.nix | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/faq.adoc b/docs/faq.adoc index c42ea8744..935317e7a 100644 --- a/docs/faq.adoc +++ b/docs/faq.adoc @@ -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] diff --git a/modules/misc/dconf.nix b/modules/misc/dconf.nix index fe51dcb08..d731679c3 100644 --- a/modules/misc/dconf.nix +++ b/modules/misc/dconf.nix @@ -21,6 +21,11 @@ in { visible = false; description = '' Whether to enable dconf settings. + + Note, if you use NixOS then you must add + programs.dconf.enable = true + to your system configuration. Otherwise you will see a systemd error + message when your configuration is activated. ''; };