this post was submitted on 04 Aug 2023
4 points (100.0% liked)
nixos
1262 readers
6 users here now
All about NixOS - https://nixos.org/
founded 4 years ago
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So what I understood here is:
Is that correct so far?
Yes, you explain better :-) The idea is that shell.nix is my development environment so I would like to use that shell.nix to interactive shells (nix-shell) and to run scripts (non-interactive use). I understand I could use a nix-shell shebang in every script, but that requires maintenance (when I modify the shell.nix file, modify the shellbang of all my scripts) and it is prune to errors (for example, modify the shell.nix and forget to modify the shebang of my scripts).
I cannot really verify this, but I think insteas of passing a list of packages you can just point the shebang to the shell.nix file, eg.
#!nix-shell -i bash ../../shell.nix