stylix
stylix copied to clipboard
home-manager activation error if using Stylix
If having Stylix enabled the systemd service home-manager-srestegosaurio.service
would fail with the following error:
× home-manager-srestegosaurio.service - Home Manager environment for srestegosaurio
Loaded: loaded (/etc/systemd/system/home-manager-srestegosaurio.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-08-01 15:56:33 CEST; 14s ago
Process: 12634 ExecStart=/nix/store/x8scjy7dpv8bp219dly0vh8fc86si3gx-hm-setup-env /nix/store/5smlvfc5dm7llwi8icb6chxa5bya6jhz-home-manager-generation (code=exited, status=1/FAILURE)
Main PID: 12634 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
CPU: 2.799s
Aug 01 15:56:33 thalos hm-activate-srestegosaurio[13401]: Writing metadata to folder /home/srestegosaurio/.cache/bat ... okay
Aug 01 15:56:33 thalos hm-activate-srestegosaurio[12634]: Activating createXdgUserDirectories
Aug 01 15:56:33 thalos hm-activate-srestegosaurio[12634]: Activating installPackages
Aug 01 15:56:33 thalos hm-activate-srestegosaurio[12634]: Activating dconfSettings
Aug 01 15:56:33 thalos dconf[13424]: unable to create file '/run/user/1000/dconf/user': Permission denied. dconf will not work properly.
Aug 01 15:56:33 thalos hm-activate-srestegosaurio[13424]: error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
Aug 01 15:56:33 thalos systemd[1]: home-manager-srestegosaurio.service: Main process exited, code=exited, status=1/FAILURE
Aug 01 15:56:33 thalos systemd[1]: home-manager-srestegosaurio.service: Failed with result 'exit-code'.
Aug 01 15:56:33 thalos systemd[1]: Failed to start Home Manager environment for srestegosaurio.
Aug 01 15:56:33 thalos systemd[1]: home-manager-srestegosaurio.service: Consumed 2.799s CPU time, no IP traffic.
I been doing some non-extensive tests and Stylix seam to be the one causing it. I have no idea about what the error means or how can it be solved. I am willing to provide any more logs and/or information.
Thanks for your time. :)
Maybe you need programs.dconf.enable = true
in your NixOS config ?
This does get enabled automatically when Stylix is installed on NixOS and the GTK target is enabled:
https://github.com/danth/stylix/blob/5f7b55cc690b5ca02d1dc19175cab2ccdd408811/modules/gtk/nixos.nix#L9
Perhaps this should be moved to a general module as dconf is required for more than just GTK