How to use gsettings? ("No schemas installed")

I don’t have Gnome installed, I installed pkgs.glib to get gsettings. I’m on Hyprland and want to switch Firefox’s light and dark themes like so: gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark',but it outputs No schemas installed.

Install gsettings-desktop-schemas. You can also modify with dconf-editor

Dconf-editor is a GUI, I want to use commands for automation.

That didn’t work, this is my config now:

environment.systemPackages = [
   pkgs.glib
   pkgs.gsettings-desktop-schemas
]

You can use dconf in the terminal! Simply add it to your pkgs and run

dconf write /org/gnome/desktop/interface/color-scheme '"prefer-dark"'

#source
https://yalter.github.io/niri/Important-Software.html#portals

2 Likes

That worked! It applied to Firefox hot-switches from light to dark and vice versa, thank you.

If you have home-manager you could try this option: https://home-manager-options.extranix.com/?query=dconf.settings&release=master

1 Like

Settings controlled with nix & home-manager require rebuilding.

I’m trying to make this work darkman but am having trouble: Making darkman work on desktop?