DeterminateSystems / zero-to-nix

Zero to Nix is your guide to learning Nix and flakes. Created by Determinate Systems.

Home Page:https://zero-to-nix.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`nix install` is not a command?

rudesome opened this issue · comments

what is meant by "a nix install command"?

You may have noticed that [`nix run`][nix-run] doesn't require anything like a `nix install` command.

It's meant as a hypothetical. There is no nix install command, and that's the what the sentence is trying to convey. You don't need to nix some-install-command booper && booper. You can just nix run.

I would spell it out explicitly. I've tried nix install after reading this fragment 😅

Not only should it be spelled out explicitly, but the idea that you just nix run everything is counterintuitive. The overall experience of going through zero-to-nix feels targeted to project-specific developer environments but even devs want some globally installed programs.

The issue from our perspective is that nix profile install doesn't play nicely with tools like Home Manager and problems with it are common enough, in our experience, that we've opted not to include it in Z2N. But I'll revisit the command and see if things have improved.

@lucperkins that's fair, appreciate you looking out for users who can get into weird situations, but along with the "nix run" recommendation might want to address upfront the obvious question that occurs around how that works with garbage collection. I don't know a lot about it but it feels like an ephemeral run and sometimes people actuallly want a persistent install.

Also reiterating - keep in mind just how project-focused zero-to-nix is and think about addressing that upfront somewhere to help people who aren't hacking on specific projects understand how this might be able to help them or not.

Personally I'm a user of nix more for foundational operating system tooling than project-specific tooling. I've got a lot of language-specific stuff + devcontainers for project-specific tools. Not to say I don't use it all or I won't it more in the future, but currently only using it for my small personal projects.