From: Scott Worley Date: Sun, 2 Aug 2026 00:55:33 +0000 (-0700) Subject: Remove comment musing about nix-env --upgrade X-Git-Url: http://git.scottworley.com/auto-upgrade-with-pinch/commitdiff_plain/17218fba8e1f573bbeb73b9ddf1a884becd834a6?ds=inline;hp=4fa1f9a93369f086f2d8c1635f5550932f056ccc Remove comment musing about nix-env --upgrade `nix-env --ugpgrade` is very broken: * It requires that all channels are interpretable as environments. This usually means creating a `default.nix` with just `{}` in it to keep getAllExprs() in nix/src/nix-env/nix-env.cc from recursing around looking for packages. * It fails when otherwise-unused packages have evaluation errors. * It evaluates all ~100,000 packages in nixpkgs. This is very slow and requires ~12 GiB of RAM. * It only does updates when the top-level packages in `manifest.nix` have version numbers that go up. * So packages inside an unversioned `buildEnv` just never get updated. Using a single `buildEnv` that is the list of packages you want is the standard, recommended way to use `nix-env`. * A `nix-env --upgrade` after `nix-env --set` will uninstall everything. --- diff --git a/upgrade-config.nix b/upgrade-config.nix index ba2bb5a..91db2b7 100644 --- a/upgrade-config.nix +++ b/upgrade-config.nix @@ -160,8 +160,6 @@ evalModules { This keeps your environment declarative and ensures that all packages receive regular updates. ''; - # It seems like "upgrade" ought to be another choice here, powered - # by "nix-env --upgrade". But when I tried this, it didn't work. }; }; }