LnL7 / nix-darwin

nix modules for darwin
MIT License
2.43k stars 407 forks source link

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

Open bestlem opened 1 month ago

bestlem commented 1 month 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