LnL7 / nix-darwin

nix modules for darwin
MIT License
3.19k stars 456 forks source link

If use-xdg-base-directories is true then NIX_PROFILES is not correct #947

Open bestlem opened 6 months ago

bestlem commented 6 months ago

If use-xdg-base-directories is set to trie then the profiles are in $XDG_STATE_HOME/nix/profile rather than ~/.nix-profile

This is covered in nixos by https://github.com/NixOS/nixpkgs/pull/241518 giving

 environment.profiles = [
      "$HOME/.nix-profile"
      "\${XDG_STATE_HOME:-$HOME/.local/state}/nix/profile"
      "/etc/profiles/per-user/$USER"
    ];

SO I think the extra line needs to be added to modules/environment/default.nix