-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thelounge: Set THELOUNGE_HOME environment variable #70318
Conversation
Hmm, I wouldn't suggest to set this environment variable globally. Instead, we might want to patch the CLI to use the used state directory location as a default. Reading its function definition, this could be accomplished by adding a
to the |
At the time I was somewhat doubtful of my own aptitude for implementing or testing it, I personally haven't written a line of Javascript in a long time. Also it's my instinct that this solution is slightly more error-prone (especially going forwards, it may need to be maintained) than simply setting an environment variable, which doesn't seem to be too much of an issue? It'll only be present when the lounge is installed after all, and is fairly well namespaced as It is something that would be nice to have a fix for, certainly. I could look at it at some point. |
Haha, oh wait, I wasn't paying enough attention... the suggestion isn't to patch the Javascript at all. |
@Ekleog just done this, seems to work nicely! |
Great! That said, I've just looked at the current state of this PR, and it looks to me like you could revert the changes in nixos/modules/services/networking/thelounge.nix now that the correct path is being set right into the CLI tools :) |
Oh, right, yes, I totally forgot! |
The output file is found and handled by thelounge itself [1], leaving the user free to override THELOUNGE_HOME in the environment if they choose, but having a sensible default to make `thelounge` generally usable in most cases. This solution follows discussion on NixOS#70318. [1] https://github.com/thelounge/thelounge/blob/9ef5c6c67e463c1f401e33b21dfb5641636e5ed1/src/command-line/utils.js#L56
Setting this environment variable allows the CLI to correctly locate the
state directory, allowing users to be added, etc. from the command line,
without additionally having to set this variable.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @Mrmaxmeier