Help setting gtk theme in home-manager

hey all, i added this bit to my config:

  gtk = {
    enable = true;
    iconTheme = {
      name = "SolArc-Dark";
      package = pkgs.solarc-gtk-theme;
    };
  };

in order to set that as my gtk theme…

however i get this error, related to dbus:

❯ sudo nixos-rebuild switch --upgrade-all --flake .
[sudo] password for thiago: 
warning: Git tree '/home/thiago/nixos' is dirty
building the system configuration...
warning: Git tree '/home/thiago/nixos' is dirty
activating the configuration...
setting up /etc...
reloading user units for thiago...
restarting sysinit-reactivation.target
the following new units were started: sysinit-reactivation.target, systemd-tmpfiles-resetup.service
warning: the following units failed: home-manager-thiago.service

× home-manager-thiago.service - Home Manager environment for thiago
     Loaded: loaded (/etc/systemd/system/home-manager-thiago.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-04-17 21:01:18 -03; 36ms ago
    Process: 2324 ExecStart=/nix/store/sjl004ksn059xz9yfhj7haap24jv3s09-hm-setup-env /nix/store/b25mzzgziak8l79ffn272bghz9dnjcp7-home-manager-generation (code=exited, status=1/FAILURE)
   Main PID: 2324 (code=exited, status=1/FAILURE)
         IP: 0B in, 0B out
        CPU: 119ms

Apr 17 21:01:17 ThiagoDesktop hm-activate-thiago[2324]: Starting Home Manager activation
Apr 17 21:01:17 ThiagoDesktop hm-activate-thiago[2324]: Activating checkFilesChanged
Apr 17 21:01:17 ThiagoDesktop hm-activate-thiago[2324]: Activating checkLinkTargets
Apr 17 21:01:18 ThiagoDesktop hm-activate-thiago[2324]: Activating writeBoundary
Apr 17 21:01:18 ThiagoDesktop hm-activate-thiago[2324]: Activating installPackages
Apr 17 21:01:18 ThiagoDesktop hm-activate-thiago[2324]: Activating dconfSettings
Apr 17 21:01:18 ThiagoDesktop hm-activate-thiago[2455]: error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
Apr 17 21:01:18 ThiagoDesktop systemd[1]: home-manager-thiago.service: Main process exited, code=exited, status=1/FAILURE
Apr 17 21:01:18 ThiagoDesktop systemd[1]: home-manager-thiago.service: Failed with result 'exit-code'.
Apr 17 21:01:18 ThiagoDesktop systemd[1]: Failed to start Home Manager environment for thiago.
warning: error(s) occurred while switching to the new configuration

and after searching about it, it seems to have something to do with the polkit, (which is setup on my machine)

any ideas ?

This seems sus, do you know which service DBus tried to activate? Have you tried rebooting?

1 Like

no, i thought it was something with notifications, because i’m not using any daemons for it, but after running dunst and trying again, it wasn’t… and yes, I have tried rebooting…

edit: is there a way i can read the failed rebuild logs?

Interesting. You can use journalctl -xeu home-manager-thiago.service to see more logs.

sadly, no new info:

i’m on unstable by the way.

here is the config:
https://github.com/Thiago-Assis-T/nixos-config

Considering that it says its activating dconfSettings, might be able to figure out what DBus call it is making. Looking at the home-manager source code, I found it is somewhere around here that the DBus cal fails. Think you can get the value of config.home.activation.dconfSettings.data in your home-manager config and tell me what comes after dconf load / < but before \n\n?

how would i go about getting that value?

You can use nix repl to help with that. Though idk where your home-manager config is at since your repo is either private or doesn’t exist.

sorry, made it public, it was private because it is a caos… i was modularizing it, then i started messing with wayland and other stuff

that reminds me, im on dwl and launching it with a dbus command, more specifically dbus-run-session dwl

Alright, I see its accessible now. You can use nix repl to run this:

  1. :lf .
  2. nixosConfigurations.ThiagoDesktop.config.home-manager.users.thiago.home.activation.dconfSettings.data

Then look for something that looks like this inside the string:

dconf load / < /nix/store/pl0m0isba6xcm4cx5qji6w4drk5xidc0-hm-dconf.ini

Once you have it, try running the command. Do not run the example I gave as it will be different on your system.

here it is:

at the very end

$DCONF_DBUS_RUN_SESSION /nix/store/ajbcv0smqbswir3zjr66qzpzqyzbfwgv-dconf-0.40.0/bin/dconf load / < /nix/store/rl1qcqfq1fdf46hbpihlsqn9mc0zs0sq-hm-dconf.ini\n\nunset DCONF_DBUS_RUN_SESSION\n

Just run the part of the command I quoted and paste what the result is like.

error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

Well, now we know what exactly is going on. Let’s figure out why it is happening. The error says ca.desrt.dconf isn’t provided as a service. Are you setting programs.dconf.enable to true? If not, could you set it to that and try rebuilding?

no… i didn’t set dconf, but after setting, had no effect.

also, this:


it is supposed to be a gtk theme, not an icon-theme… do you think it’s relevant?

I’ll try another theme and get back here

retried with the dracula and ant themes, to no avail…

Well, this is wrong heh. Remove the quotes and it should set the icon theme.

sorry, i fixed it in my machine, and didn’t commit, but still nothing…

Hmm, what do you mean by nothing?