Follow

linux OSes should not let you install packages via the command line; you should be required to add them to a syntax-checked file and then run a command to ensure system installed packages match the file.

@sneak that would be so incredibly frustrating

@sneak something like Gemfile.lock in Ruby poetry.lock in python but for system packages?

@sneak have you heard the good news about #nixos?😂​

@unclechu @raboof which, incidentally, still lets you set yourself up for file collisions via `nix-env -i <pkg>` instead of requiring that they be in configuration.nix

@sneak @raboof I personally have never used “nix-env”, just never felt that I need it. I’m not even sure how it works, just heard before that it’s “impure” or something like this. If I need a package which is not installed into my system I just do “nix-shell -p <pkg> --run <pkg>”.

@unclechu @raboof i'm glad that you know in advance all of the packages you want installed on your system. i do not.

@sneak @raboof I am not. I just install new packages incrementally. It’s not very hard to add a new line here github.com/unclechu/nixos-conf and call “sudo nixos-rebuild switch” and commit+push the changes. Once you fill this list enough it happens pretty rare.

@unclechu @raboof yes that is precisely what i do now, and what this thread is about. it's also possible to add system packages without touching configuration.nix via `nix-env -i <pkg>` which then causes overlaps with the packages in configuration.nix, requiring an uninstall `nix-env --uninstall <pkg>` before `nixos-rebuild switch` will work.

@sneak @unclechu right - so you *can* get the behavior you want (by deciding not to use nix-env), but indeed you're not 'required' to.

I wonder if nix-env should even be installed on NixOS by default - I've always thought of it as something you'd use when using Nix outside of NixOS.

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!