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

nix profile has bad UX #7966

Open
8 of 16 tasks
bobvanderlinden opened this issue Mar 4, 2023 · 13 comments
Open
8 of 16 tasks

nix profile has bad UX #7966

bobvanderlinden opened this issue Mar 4, 2023 · 13 comments
Labels
bug new-cli Relating to the "nix" command profiles Versioned gc root symlinks; nix profile, nix-env UX The way in which users interact with Nix. Higher level than UI.

Comments

@bobvanderlinden
Copy link
Member Author

bobvanderlinden commented Mar 4, 2023

3 of these issues can be resolved if we could refer to installed packages by name instead of by index:

@thufschmitt thufschmitt added UX The way in which users interact with Nix. Higher level than UI. new-cli Relating to the "nix" command labels Mar 4, 2023
@thufschmitt
Copy link
Member

Thanks a lot for listing all these. I think that will be incredibly useful for #7701

@alper
Copy link

alper commented May 6, 2023

I just got here and with all the documentation around it I still haven't been able to figure out what nix profile does and why I need it or how to use it.

Given how confusing a lot of the documentation is… maybe a full revamp is in order.

Update: I got it. nix profile is great, the documentation in CLI and on web are good and it's the simplest way really to install global packages.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/flakes-as-a-unified-format-for-profiles/29476/1

@iFreilicht
Copy link
Contributor

#6481 was abandoned in favor of #8631; you may want to update the todo list :)

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-flakes-is-an-experiment-that-did-too-much-at-once/32707/12

@viperML
Copy link

viperML commented Dec 18, 2023

Thanks for compiling the issues. I wanted to write a home-manager alternative ( https://github.com/viperML/activation-manager ), that relies on being installed as part of a buildEnv + nix profile install /flake#package-output. But I just faced all the bad UX of nix profile.

@iFreilicht
Copy link
Contributor

@bobvanderlinden now that #8678 has been merged, could you re-evaluate whether which of these issues are resolved?

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-12-15-nix-team-meeting-minutes-112/38155/1

@roberth roberth added the profiles Versioned gc root symlinks; nix profile, nix-env label Mar 22, 2024
@iFreilicht
Copy link
Contributor

Two more issues that might be worth adding here: #10463, #10419

@bobvanderlinden
Copy link
Member Author

@iFreilicht I think they can both be considered duplicates. I've commented in the issues.

@trim21
Copy link

trim21 commented Oct 18, 2024

nix profile remove --all will also remove nix itself, is this expected?

@iFreilicht
Copy link
Contributor

@trim21 Yes. nix profile expects a system-wide nix installation to be present. If you end up in this situation, you can still search for nix by running a glob and picking one of the outputs. For example:

# echo /nix/store/*-nix-2*/bin
/nix/store/009hyb1ryy8jrypqikcaz4nfh3xkbaaz-nix-2.18.2/bin/ /nix/store/h16lidvhs90r2pvqns0kkv9ffha0h25p-nix-2.19.4/bin/ /nix/store/hghqbpw1d5a2kqzjjn68wm9klqbmjvk0-nix-2.18.2/bin/ /nix/store/l876hksjiz1240d5in5ksdzskag0w15k-nix-2.18.7/bin/ /nix/store/ma0p24nzjcylflyn4bz4wj8kf28a7ida-nix-2.18.5/bin/ /nix/store/nxk53ss4jcbf6i3pf1r1gz7di5jhaajm-nix-2.18.2/bin/ /nix/store/nzf1wy0z8j8dpsv49x8g5i93c7i6bcph-nix-2.18.5/bin/ /nix/store/xcdazpgbpc3inr2hqsxahb0wmbndp04a-nix-2.19.6/bin/ /nix/store/ycn722fb286lpg0h32lg935l6nxjhkq5-nix-2.19.6/bin/
# /nix/store/009hyb1ryy8jrypqikcaz4nfh3xkbaaz-nix-2.18.2/bin/nix profile install nixpkgs#nix
# nix --version
nix (Nix) 2.18.7

If you think this is a bad idea and want to it to be changed, please open a separate issue so we can discuss it there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new-cli Relating to the "nix" command profiles Versioned gc root symlinks; nix profile, nix-env UX The way in which users interact with Nix. Higher level than UI.
Projects
Status: In discussion
Development

No branches or pull requests

8 participants