Code Monkey home page Code Monkey logo

Comments (3)

gcurtis avatar gcurtis commented on July 30, 2024

I'm having trouble reproducing this one. Do you mind telling me if any of the following paths exist on your system?

ls -l \
	"/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" \
	"$HOME/.nix-profile/etc/profile.d/nix.sh" \
	"$HOME/.local/state/nix/profile/etc/profile.d/nix.sh" \
	"$HOME/.local/state/nix/profiles/profile/etc/profile.d/nix.sh"

What's the output of nix --version --debug?

Do you see something like the following in /etc/bash.bashrc or /etc/profile.d/nix.sh?

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

from devbox.

gcurtis avatar gcurtis commented on July 30, 2024

Also, if you add a verbose flag does it tell you which paths are being removed?

devbox run -- nix store gc --verbose --extra-experimental-features nix-command

from devbox.

undecided avatar undecided commented on July 30, 2024

Thanks!

❯ ls -l         "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"     "$HOME/.nix-profile/etc/profile.d/nix.sh"       "$HOME/.local/state/nix/profile/etc/profile.d/nix.sh"   "$HOME/.local/state/nix/profiles/profile/etc/profile.d/nix.sh"
ls: cannot access '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh': No such file or directory
ls: cannot access '/home/matthew/.local/state/nix/profile/etc/profile.d/nix.sh': No such file or directory
-r--r--r-- 1 matthew matthew 2880 Jan  1  1970 /home/matthew/.local/state/nix/profiles/profile/etc/profile.d/nix.sh
-r--r--r-- 1 matthew matthew 2880 Jan  1  1970 /home/matthew/.nix-profile/etc/profile.d/nix.sh

Nix version:

❯ nix --version --debug
nix (Nix) 2.18.1
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/matthew/.config/nix/nix.conf:/etc/xdg/xdg-cinnamon/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/azvn85cras6xv4z5j85fiy406f24r1q0-nix-2.18.1/share

❯ cat /etc/nix/nix.conf
cat: /etc/nix/nix.conf: No such file or directory

Nothing nix related in /etc/ - sudo grep -ir nix /etc/bash* /etc/profile* gave no results

And with verbose flag:

projects/third_party/devboxplay via impure 
❯ devbox run -- nix store gc --verbose --extra-experimental-features nix-command
finding garbage collector roots...
deleting garbage...
deleting '/nix/store/ys6g8wvr5rwxyfqrlvwd7vipj9ysqn70-nss-cacert-3.92'
deleting '/nix/store/hzx954rnda4k348rb4wvqbdzp9z0ynjy-user-environment.drv'
deleting '/nix/store/8xl4kcn7lgaa9chyqwjjsd7xbq842hml-user-environment'
deleting '/nix/store/qa5v8vixm2z468nw49wcvgqiq61dlg8s-env-manifest.nix'
deleting '/nix/store/9kbkm00saz41sxfs6bxmvkb9k4qk495y-nixpkgs-unstable'
deleting '/nix/store/sn54r0d8p033g71s08nhsabhwhl07f5d-source'
deleting '/nix/store/b319178j5b2c7i9xvpnik81881jy11fj-source'
deleting '/nix/store/j0jlb33bm31w347w43051hbffgh616jr-source'
deleting '/nix/store/q9kr7w9lb4b7kxb9p647qzxarjrbr8x0-nix-shell.drv'
deleting unused links...
note: currently hard linking saves 0.00 MiB
9 store paths deleted, 133.72 MiB freed

❯ 
exit

❯ devbox shell

Error: Unable to find nix startup file. If /nix directory exists it's possible the installation did not complete successfully. Follow instructions at https://nixos.org/download.html for manual install.

from devbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.