catppuccin / nix

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

Why option `xdg.enable` is required? #178

Closed stasjok closed 1 month ago

stasjok commented 1 month ago

I've added this module to my home-manager config and I've got Option xdg.enable must be enabled to apply Catppuccin theming error. I wonder why is this option required? What this option does is adding environment variables and allows to change directories for it. But if this option is not enabled, then default directories are used and no environment variables are set. All programs are expected to use default directories if there is no env vars. A specifically didn't enable xdg to not create extra env variables and it all works well. I think this module should not require to set xdg.enable. Am I missing something?

isabelroses commented 1 month ago

We use xdg.configFile to set a large number of files, so we have the assertion that xdg.enable = true such that those links will work correctly. For example https://github.com/catppuccin/nix/blob/d6344610c04af0f8e315fef45dd3b854014b119e/modules/home-manager/fcitx5.nix#L34

stasjok commented 1 month ago

My question was in what cases they don't work correctly if xdg.enable = false? I and home-manager itself also use xdg.configFile.filename regularly and it works just fine. Files are placed in default directories. Programs are loading them in default directories.

Only env variables are defined when xdg.enable = true: https://github.com/nix-community/home-manager/blob/e3ad5108f54177e6520535768ddbf1e6af54b59d/modules/misc/xdg.nix#L91-L117. Only thing I'm not sure is version older than 20.09. It's treated specially in the home-manager. Maybe this requirement has come from some very some versions?

stasjok commented 1 month ago

Wait, I found a couple of conditions like this in home-manager: https://github.com/nix-community/home-manager/blob/e3ad5108f54177e6520535768ddbf1e6af54b59d/modules/programs/lazygit.nix#L51.

So maybe it is required on Darwin. On Linux I think it's definitely not required.