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
macOS - User does not own "system" or "default" profile #43
Comments
Try this
|
Nix is so damn confusing 😆 When you see any Nix command with a - in it, like Anything with a space, like https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-shell I dropped all usage of channels in this project, so it's flakes only. |
That works, but only for the shell in which it's run. I use tmux a lot and am constantly spawning/killing shell sessions as part of the same workflow. Is there no way to install an ad-hoc package to a profile? |
I kind of skipped the whole Nix profile feature in this project, as I felt it was somewhat overkill. Here's my workflow:
Most of my packages end up in shared: But for Darwin specific, I put them here: It's really easy to add and remove them without any consequence. From my understanding, profiles just give you the ability to rotate between different sets of packages in your environment, which I don't really use. As long as you don't update your flake.lock file, and just add a package to your configuration, it's very fast to install it (~same speed as profile or nix shell). It's only when you run |
Hi @tlindsay, curious if the above workflow is sufficient for your use case. I'd just install tmux as part of your configuration if you use it all the time (it's what I do). |
tmux is installed as part of my configuration, that's not really the issue. The issue is that I lose access to whatever command I need from It would be nice to be able to install something and have it persist until I generate a new generation from my flake. That lets me try things out, but have them automatically garbage collected whenever I rebuild my flake. If I need something past that point, it tells me something about how useful that tool actually is, and whether it deserves to become a permanent addition. (Also, sorry for the long delay between responses. I need to tame my Github notification settings 😅) |
Okay, I understand now. When
So nothing is ever really installed, it's just sitting in the Nix Store. Your You may want to look at Otherwise, you're looking at a script that exports your You could do something like this: Add to your .bashrc/.zshrc:
This says:
To reset/clear it, you can just delete the |
Hi @tlindsay, I'm spending some time cleaning up Github Issues. I hope the answer above helps in some way. Let me know here (on this Issue) if you have any more questions. |
I'd like to be able to install packages ad-hoc without generating a whole new profile generation. Sometimes I'm test driving something, sometimes I'm just in a hurry and don't want to go through the whole process of editing a nix file and rebuilding my system. I understand that installing packages this way isn't "permanent" in the way that declaring them in my nix config is, and I still want to be able to do this.
Using
$ nix-env -iA nixpkgs.hello
I get errors saying thatnixpkgs
isn't in my default search path, which is confusing to me given the output fromnix-channel --list
.My next idea was to try
$ nix profile install 'nixpkgs#hello'
, but that also has issues.If I understand things correctly, I have 3 nix profiles:
~/.local/state/nix/profiles/home-manager
,/nix/var/nix/profiles/system
and/nix/var/nix/profiles/default -> /nix/var/nix/profiles/per-user/root/profile
Trying to
$ nix profile install
to the HM profile seems like a bad idea and not what I want, so that leaves me with thesystem
andper-user/root
profiles to try, but those both give permission denied:I don't know if I've installed something incorrectly, or if I'm going about this the wrong way.
The text was updated successfully, but these errors were encountered: