Open p16i opened 7 months ago
I'm experiencing siimilar error with devenv gc
and devenv 1.0.4
caused by the unknown impure
argument:
cloudv on main [$!?] via 🐹 v1.22.1 via v18.12.1 with 🐃 v1.30.0 via ❄️ impure (devenv-shell-env) on ☁️
❯ devenv gc
✔ Removing non-existing symlinks in /home/stano/.local/share/devenv/gc ... in 0.0s.
• Found 9 active environments.
• Deleted 0 dangling environments (most likely due to previous GC).
error:
error: unexpected argument '/nix/store/7fpp142mg3ccryxakwpz5q2pyf4yhf5h-devenv-shell-env'
Try '/nix/store/a0i9g29xgmk42gjjglzd6k0kzyjkay3n-nix-2.21-devenv/bin/nix --help' for more information.
✖ Command produced the following output:
✔ Running garbage collection (this process may take some time) ... in 0.0s.
Error: × Command `/nix/store/a0i9g29xgmk42gjjglzd6k0kzyjkay3n-nix-2.21-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --option eval-cache false --keep-
│ going --max-jobs 6 store gc /nix/store/7fpp142mg3ccryxakwpz5q2pyf4yhf5h-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/
│ r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/qjns4077lyh4626xa14ps875krjdb7fn-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-
│ env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env --impure` failed with with exit code 1
This is my devenv.yaml
:
allowUnfree: true
impure: true
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
nixpkgs-terraform:
url: github:stackbuilders/nixpkgs-terraform
@p16i does /nix/store/wymhs667k4ggiaz7lq1vcycsi97vkmwf-devenv-shell-env exist?
@domenkozar thanks for promptly response!
This is what I got
$ ls -la /nix/store/wymhs667k4ggiaz7lq1vcycsi97vkmwf-devenv-shell-env
-r--r--r-- 1 root root 71596 Jan 1 1970 /nix/store/wymhs667k4ggiaz7lq1vcycsi97vkmwf-devenv-shell-env
It is there but empty.
@domenkozar thanks for working on the issue :raised_hands:
Btw is there a way how to run gc
manually? I've tried to remove impure: true
from my devenv.yaml
, but it's still failing and I've already ran out of the disk space, completely blocked from using devenv rn.
$ devenv gc
✔ Removing non-existing symlinks in /home/stano/.local/share/devenv/gc ... in 0.0s.
• Found 14 active environments.
• Deleted 0 dangling environments (most likely due to previous GC).
error:
error: unexpected argument '/nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env'
Try '/nix/store/a0i9g29xgmk42gjjglzd6k0kzyjkay3n-nix-2.21-devenv/bin/nix --help' for more information.
✖ Command produced the following output:
✔ Running garbage collection (this process may take some time) ... in 0.0s.
Error: × Command `/nix/store/a0i9g29xgmk42gjjglzd6k0kzyjkay3n-nix-2.21-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features
│ flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 6 store gc /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/
│ store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/7fpp142mg3ccryxakwpz5q2pyf4yhf5h-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-
│ devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/
│ r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/qjns4077lyh4626xa14ps875krjdb7fn-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-
│ devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/
│ r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-shell-env /nix/store/r3d57ii1jb27crfm7mxcww42v8jsw2mb-devenv-
│ shell-env` failed with with exit code 1
sudo -E nix-collect-garbage
sudo -E nix-collect-garbage
Awesome, TY!
One OT note for others: the command didn't work with -E
( I have devenv & nix installed on Ubuntu 22.04):
$ sudo -E nix-collect-garbage
sudo: nix-collect-garbage: command not found
Though switching to root without preserving the env vars (sudo -i
) and executing nix-collect-garbage
worked:
stano@rpu ~/workspace/redpanda/cloudv2/apps/external-dns-helper (main*?) $ sudo -i
root@rpu:~# which nix-collect-garbage
/root/.nix-profile/bin/nix-collect-garbage
root@rpu:~#
logout
$ which nix-collect-garbage
/nix/var/nix/profiles/default/bin/nix-collect-garbage
This is a bug in this PR: https://github.com/NixOS/nix/pull/8417
Describe the bug I have just moved to nixOS, and I am learning how to use
devenv
for my development environments. It seems that thedevenv gc
due to an error of unexpected argument for the commandnix store gc
.To reproduce
In this case, the
devenv.nix
anddevenv.yaml
that I have are directly from whatdevenv init
provides.Error when running
devenv gc
Version