catppuccin / nix

❄️ Soothing pastel theme for Nix
https://nix.catppuccin.com/
MIT License
357 stars 48 forks source link

Path of k9s skin is broken on Darwin when XDG_CONFIG_HOME is unset #310

Closed m-wynn closed 2 weeks ago

m-wynn commented 1 month ago

On Darwin, If XDG_CONFIG_HOME is set, k9s will use that path for its files (e.g. ~/.config/k9s. If it is unset, k9s will use ~/Library/Application\ Support/k9s.

Right now, catppuccin/nix will always use the xdg path.

Home-manager gets around this with the following:

    skinFiles = mapAttrs' (name: value:
      nameValuePair (if !(isDarwin && !config.xdg.enable) then
        "k9s/skins/${name}.yaml"
      else
        "Library/Application Support/k9s/skins/${name}.yaml") {
          source = yamlFormat.generate "k9s-skin-${name}.yaml" value;
        }) cfg.skins;

Of course, an easy workaround is to enable XDG in your home-manager config and then export the XDG environment variables:

xdg = {
  enable = true;
};
alejandro-angulo commented 4 weeks ago

I ran into this exact issue earlier today. I opened up PR #311 .

@m-wynn Would you mind testing out the change if you get a chance please? My repo is https://github.com/alejandro-angulo/catppuccin-nix/.

m-wynn commented 4 weeks ago

Thanks @alejandro-angulo. This worked for me as expected both with and without xdg.