How to view hidden files

So, I’ve noticed that there are a bunch of files in the /nix/store/ directory with no way to view them. Recently, though, I just figured out how to view them.

  1. Create a new Python Repl.
  2. Go to the Shell tab (it should automatically open upon creation of the Repl)
  3. Execute the following command:
cd /nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10
  1. Type dir to view all the libraries and builtin files.
  2. Type nano <file>.py to view the contents of the file. If you wish to copy the contents of the file to make it editable in the workspace, press Ctrl+O and when it asks you for the filename, delete all existing content and type /home/runner/<your-repl-slug>/
1 Like

or you know…

cp -r /nix/store nix-pub

I executed that, and it just creates an empty folder called nix-pub.

1 Like

no it’s not empty, there’s just too many files in /nix/store so you just choose a specific one, like for example, /nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10

To add on to this, here is a table listing all the known Nix packages and their corresponding directories.

Package name Nix directory
pkgs.nano /nix/store/5n5pjgv0pjdxfkbaqi3nl6wp55zlzcxy-nano-7.0
pkgs.qtile /nix/store/36aw9jkjgl0qwnvm4jz5rj1vwldb9h14-qtile-0.22.1
pkgs.python39Full /nix/store/nwpv33bscqyf1d9janfjhw1k716r7fd4-python3-3.9.15
pkgs.python38Full /nix/store/5g6y3nzq80fkq54ahan2slc57j6327nj-python3-3.8.15
pkgs.python3Minimal /nix/store/igdcckxrd115041zvvcqmw9qxwf6pfxv-python3-minimal-3.10.8

(This will be updated periodically)

I’m not 100% sure but I believe the random characters before the package name may be temporary and change from time to time.

Could you make that a wiki?

They do, but if replit keeps old derivations, they should be reliable

you can use nix eval nixpkgs.<your pkg name>.outPath to find that for each repl


Does nix have a C API?

How do I make it a wiki?

I’m not sure. You can figure it out by creating a C Repl and looking in replit.nix.

To see hidden files in the interface, just click on the three dots in the sidebar with files and find the item “show hidden files”

Unfortunately you can’t do that with the hidden HIDDEN files in /nix/store/...