| 3 Mar 2026 |
raitobezarius | Things like https://github.com/nix-community/nh probably indicate we can improve | 12:14:10 |
WeetHet | Okay but flakes are a bug | 12:14:16 |
WeetHet | They should not exist | 12:14:37 |
raitobezarius | Honestly, I don't care much about Flakes but they exist and there's users, we cannot break them mindlessly, we need to provide a progressive path | 12:15:08 |
raitobezarius | Exiting Flakes should be invisible to any user | 12:15:17 |
K900 | And honestly I'd argue that nix2 UX is also really bad in a lot of places | 12:15:24 |
K900 | (and nix3 is mostly just differently bad) | 12:15:48 |
KFears 🏳️⚧️ (they/them) | In reply to @weethet:catgirl.cloud Please can someone explain to me what the issue with nix2 CLI is, I genuinely don't get why it has to be replaced with nix3/nix4? My experience: nix2 CLI is awkwardly split into different commands (nix-env, nix-store, nix-shell), has inconsistencies between similar kinds of operations across different commands, a bit "dated" (uses short flags that are a bit unintuitive, since they were based on some old RPM package manager that is bo longer used), and has surprising footguns (e.g. nix-env -i vs nix-env -iA, partial upgrades, package upgrade logic) | 12:16:03 |
WeetHet | nix-env should not exist, different commands having inconsistencies is expected since they are not, well, the same actually | 12:17:32 |
KFears 🏳️⚧️ (they/them) | It also has weird integration (or lack thereof) with other components and the rest of the ecosystem, e.g. nix-channel is not part of Nix CLI if memory serves, and nixos-rebuild is a completely different script) | 12:17:52 |
WeetHet | Well, nix-channel is also something that should just be deprecated, and nixos is not a part of nix itself | 12:18:34 |
KFears 🏳️⚧️ (they/them) | In reply to @weethet:catgirl.cloud nix-env should not exist, different commands having inconsistencies is expected since they are not, well, the same actually Well, I have my hot takes on nix-env and other stuff, but you asked about UX sharp edges :) | 12:18:52 |
KFears 🏳️⚧️ (they/them) | There's also backwards compat and the rest of the ecosystem to consider, hence the desire for Nix4 CLI that would do things well | 12:20:32 |
WeetHet | These commands have an okay UX:
nix-build
nix-instantiate
nix-collect-garbage
nix-copy-closure
nix-shell
nix-store
nix-info
(modulo using --log-format multiline-with-logs)
| 12:20:33 |
K900 | nix-shell lol | 12:22:22 |
K900 | How many distinct invocation modes does that thing have, like five? | 12:23:06 |
WeetHet | What's wrong with nix-shell? | 12:22:49 |
K900 | What isn't wrong with nix-shell | 12:23:41 |
WeetHet | Two, no? -p for a shell with packages from <nixpkgs> and the derivation produced by -E/-A or the fileish otherwise | 12:25:05 |
K900 | There's also nix-shell /nix/store/raw.drv | 12:25:27 |
K900 | And the weird shebang thing | 12:25:35 |
K900 | And I think you can also do nix-shell /nix/store/outpath? | 12:25:54 |
KFears 🏳️⚧️ (they/them) | In reply to @weethet:catgirl.cloud Two, no? -p for a shell with packages from <nixpkgs> and the derivation produced by -E/-A or the fileish otherwise There's the with-compiler variant, no-compiler variant, eval variant, and shebang variant, from the top off my head | 12:25:58 |
K900 | Also --pure and not --pure doing VERY different things | 12:26:19 |
K900 | Except when they don't | 12:26:23 |
K900 | Also, -p is a horrid layering violation | 12:26:56 |
KFears 🏳️⚧️ (they/them) | I think there's something fucky with --interpreter, too? Don't remember, been a long time | 12:26:54 |
K900 | And all of nix-shell inherently knows about stdenv | 12:27:04 |
goldstein | nix shell / nix develop divide is imho more intuitive than what nix2 has | 12:28:41 |
WeetHet | I don't think this is fixable | 12:29:40 |