this post was submitted on 12 Sep 2025
5 points (85.7% liked)

nixos

1498 readers
1 users here now

All about NixOS - https://nixos.org/

founded 5 years ago
 

If I imperatively install packages with nix-env -iA packagename and then update my channels, how do I update the installed packages?

nix-env --upgrade tries to evaluate all of nixpkgs and gets earlyoom-killed after using all (16G) my ram and all (12G) my swap.

I can't get the attr names of installed packages with nix-env --query --installed --attr-path because --attr-path only works with --available, not --installed.

Is keeping track of the attr names separately (not really using nix-env to manage installed packages) the only way?

(Please no "use flakes" or "use declarative nix-env -r with a buildEnv overlay that's the list of packages you want". I understand that these are alternatives. I'm trying to determine if there's any way to use the imperative nix-env -i mechanism and still have automatic updates.)

you are viewing a single comment's thread
view the rest of the comments
[–] chkno@lemmy.ml 2 points 3 days ago

I'm looking for something that can run unobtrusively in the background as an automatic update. I don't have the cgroups wizardry skill to make swapping out many gigabytes non-disruptive to a normal desktop experience.