Today I discovered stylix
.
I applied stylix
with flake and with minimal configurations:
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
};
I also use home-manager nixos module.
After a nixos-rebuild switch
, it messed up the color of tmux I set in home-manager.
I inspect ~/.config/tmux/tumx.conf
, there is a special line responsible to this which was inserted by stylix:
source-file /nix/store/eeeeeeeeeeeeeeeeeeeeee-base16-gruvbox-dark-hard.conf
So I tried to set stylix.targets.tmux.enable = false;
in home-manager and do a nixos-rebuild switch
to get rid of this line, but it failed.
After some trial and error, I found that I have to explicitly do some tricks with TWO nixos-rebuild swich
to achieve it.
The steps are as follow:
- Explicitly also set
stylix.autoEnable = false;
in home-manager and do anixos-rebuild switch
to disable all the theme applied to home-manager by stylix. - Then I remove
stylix.autoEnable = false;
in home-manager, and explicitly setstylix.targets.tmux.enable = false;
in home-manager, and do anixos-rebuild switch
. This time the abovesource-file /nix/store/eeee....dark-hard.conf
disappeared in~/.config/tmux/tmux.conf
I think nix
should not behave this way.