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
Introduce environment.profileRelativeSessionVariables #68492
Introduce environment.profileRelativeSessionVariables #68492
Conversation
I'm glad the changes in #67942 are more generally useful 👍 Originally I didn't have a |
I actually like it this way, I think I'd expect |
daef63f
to
4ba952a
Compare
We currently have it setup for
Should we do the same for |
9a50b4a
to
276d62f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
Does this activate early enough that systemd system services will get it? I'm sure I've had problems before due to them not having XDG_DATA_DIRS
set properly.
@@ -157,6 +157,8 @@ in | |||
# terminal instead of logging out of X11). | |||
environment.variables = config.environment.sessionVariables; | |||
|
|||
environment.profileRelativeEnvVars = config.environment.profileRelativeSessionVariables; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this seemed unnecesssary, then I read the comment on the assignment above. Maybe move this up a line so it obviously belongs with the previous one.
@@ -30,7 +32,7 @@ in | |||
]; | |||
|
|||
# TODO: move most of these elsewhere | |||
environment.profileRelativeEnvVars = | |||
environment.profileRelativeSessionVariables = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using environment.sessionVariables
for the assignments to environment.variables
above as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to migrate all uses of environment.variables
to sessionVariables
where appropriate (in another PR).
Also, I think that would infinitely recurse.
environment.profileRelativeSessionVariables = mkOption { | ||
type = types.attrsOf (types.listOf types.str); | ||
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; }; | ||
description = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have some guidance about when to use this versus environment.profileRelativeEnvVars
(likewise sessionVariables
vs environment.variables
). I'm not sure where that should live, though.
I did |
I guess it's too much to hope that it'll get into |
…nVariables There is a need for having sessionVariables set relative to the Nix Profiles. Such as in NixOS#68383.
environment.profileRelativeSessionVariables should make this unneeded.
Many desktop environment modules are already setting this so it already makes sense to just do this globally.
276d62f
to
6663a79
Compare
Motivation for this change
Fixes the general issue found in #68383. This has been useful for every display-manager.
Thanks @rycee for 5736489 it was magically just the commit I needed.
Originates from #67942.
This will allow me to fix elementary/greeter#318 and hopefully update it to its latest release.
Things to test for display-managers
lightdm greeters have proper theming
correct cursor theme is used in gdm
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 @