top | item 44366480

(no title)

aequitas | 8 months ago

I use Nix exactly because it doesn't allow installing things at runtime. This keeps me from hitting surprises where the runtime environment changes from under me. Containers can partially solve this problem as well but have their own usability issues.

Nowadays I start every project with `nix flake init --template templates#utils-generic`. And put everything in that related to the project. I even had some projects where I had to put 'ssh' as a pinned package as it was used in some scripting and the default macOS and Linux versions accepted different flags.

I also do love that I can do something like `nix run nixpkgs#nmap` on any machine I'm on to instantly run a program with worrying where to get it from. I also use this feature in some of our projects so you can click a link in the admin web interface which is a 'command url' for iTerm2[0] like: `nix run gitlab.com/example/example/v1.0 -- test http://example.com` which will prompt to run that specific version of the command in your terminal, without have to checkout the source repo. In this case it is to rerun specific task locally for debugging purposes.

[0] https://iterm2.com/documentation-command-selection.html

discuss

order

No comments yet.