Skip to content

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

Open

Description

@Straffern

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

Activity

  1. bestlem commented on Nov 7, 2024

    @bestlem

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

  2. Straffern commented on Nov 12, 2024

    @Straffern
    Author

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

  3. Nikola-Milovic commented on Nov 16, 2024

    @Nikola-Milovic

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions