Skip to content
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

Is it possible to access home config, from nixos config? #137

Open
Straffern opened this issue Nov 6, 2024 · 3 comments
Open

Is it possible to access home config, from nixos config? #137

Straffern opened this issue Nov 6, 2024 · 3 comments

Comments

@Straffern
Copy link

I need to set an environment variable depending on if a home manager module is enabled. Specifically I want something like this:

environment.sessionVariables.NIXOS_OZONE_WL = mkIf snowfallorg.users.${
        config.${namespace}.user.name
      }.home.config.desktop.hyprland.enable
      "1"; # Hint electron apps to use wayland

Where desktop.hyprland is a module living in:
modules/home/desktop/hyprland/default.nix

@bestlem
Copy link

bestlem commented Nov 7, 2024

Why do you need its as a global variable for all users rather than setting it in home-manager using home.sessionVariables ?

@Straffern
Copy link
Author

Straffern commented Nov 12, 2024

@bestlem NIXOS_OZONE_WL has to be a global variable. Hyprland does not load user vars.

@Nikola-Milovic
Copy link

Can you reverse it? You set hyprland on the nixos system level (you can have just empty option) and then check for that in the home modules with osConfig? I had a few of these cases myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants