8

I can't find a proper way of setting gtk themes under NixOS. My usual approach is lxappearance, but after installing some gtk-themes with nix lxappearance can't find them (as there is no /usr/share/themes, but the themes aren't under .local/share/themes). In the case of fonts I can just use the fonts.fonts option in configuration.nix, but there is no option for this in the case of icons and themes. The only thing I found so far is this old config.nix with some scripts, but it is a really hacky solution, which I would rather not use.

I am using bspwm as window manager. Also, I tried installing it with configuration.nix as well as nix-env -i.

FloriOn
  • 267
  • 2
  • 12
  • 4
    What is hacky about it? I configure all my themes & icons in my configuration.nix, in this way: https://github.com/bennofs/etc-nixos/blob/master/conf/desktop.nix – bennofs Jul 28 '16 at 11:41

1 Answers1

4

home-manager's gtk.theme might be a good alternative.

If you plan to install things into an user environment in a declarative way, home-manager is a very good tool to use.

Using it, you can easily install (and set) a GTK theme declaratively on your home.nix:

{ pkgs, ... }:
{
  gtk = {
    enable = true;
    theme = {
      name = "Materia-dark";
      package = pkgs.materia-theme;
    };
  };
}
Misterio
  • 158
  • 6