Search nix packages versions - and minimalist devshell and version manager built on nix - Flake generator for version pinned packages.

use .sh extension

+18 -15
+2 -2
docs/README.md
··· 71 71 </details> 72 72 73 73 ### As a direnv shell generator 74 - > Our `use_nix_tools.bash` endpoint can get you a `direnv` shell in no time!<br/> 74 + > Our `use_nix_tools.sh` endpoint can get you a `direnv` shell in no time!<br/> 75 75 > You don't even need `nix-versions` installed, just `nix` and `direnv`. 76 76 ```shell 77 - direnv fetchurl "https://nix-versions.alwaysdata.net/use_nix_tools.bash/ruby/cowsay" 77 + direnv fetchurl "https://nix-versions.alwaysdata.net/use_nix_tools.sh/ruby/cowsay" 78 78 ```
+5 -5
docs/tools-version-manager.md
··· 28 28 If you are new to Nix but have used other version managers like `nvm`, `rvm`, `asdf`, `mise` we want to provide you with an integrated toolset that lets you take advantage of Nix 29 29 without mandating you to learn the nix-language. By editing plain-text files and reusing your existing `.ruby-version`, `.node-version`, etc files, you can cover most of your needs. 30 30 31 - ::: info ⚡ Fast Track ⚡ 🏃 - The `use_nix_tools.bash` endpoint. 31 + ::: info ⚡ Fast Track ⚡ - 🏃 The quick-n-dirty `use_nix_tools.sh` endpoint. 32 32 33 33 If you already have Nix and direnv installed, you can quickly get an environment ready in no time. 34 34 Note that you don't even need `nix-versions` installed locally for this to work. ··· 40 40 41 41 ```bash 42 42 # Place this on your .envrc 43 - source_url "https://nix-versions.alwaysdata.net/use_nix_tools.bash/go/ruby" HASH 43 + source_url "https://nix-versions.alwaysdata.net/use_nix_tools.sh/go/ruby" HASH 44 44 ``` 45 45 46 46 Where `HASH` can be obtained with: 47 47 48 48 ```bash 49 - direnv fetchurl "https://nix-versions.alwaysdata.net/use_nix_tools.bash/go/ruby" 49 + direnv fetchurl "https://nix-versions.alwaysdata.net/use_nix_tools.sh/go/ruby" 50 50 ``` 51 51 52 52 You can obtian package updates by doing `direnv reload`. ··· 120 120 ::: 121 121 122 122 123 - All you need now is to create the following file `$HOME/.config/direnv/lib/use_nix_tools.bash`. This file 123 + All you need now is to create the following file `$HOME/.config/direnv/lib/use_nix_tools.sh`. This file 124 124 will install a function that all your projects can use to load their respective environment. 125 125 126 126 ```shell 127 127 mkdir -p ~/.config/direnv/lib 128 128 # You can always inspect the downloaded function before installing it 129 - curl "https://nix-versions.alwaysdata.net/use_nix_tools.bash" -o ~/.config/direnv/lib/use_nix_tools.bash 129 + curl "https://nix-versions.alwaysdata.net/use_nix_tools.sh" -o ~/.config/direnv/lib/use_nix_tools.sh 130 130 ``` 131 131 132 132 Then, on your project directory, besides your `.nix_tools` file, create an `.envrc` file that will be
+5 -5
web/main.go
··· 22 22 "github.com/vic/ntv/packages/search_spec" 23 23 ) 24 24 25 - //go:embed use_nix_tools.bash 25 + //go:embed use_nix_tools.sh 26 26 var use_nix_tools_bash string 27 27 28 28 func main() { 29 - http.HandleFunc("/use_nix_tools.bash", HandleUseNixToolsBash) 30 - http.HandleFunc("/use_nix_tools.bash/", HandleUseNixToolsBash) 29 + http.HandleFunc("/use_nix_tools.sh", HandleUseNixToolsBash) 30 + http.HandleFunc("/use_nix_tools.sh/", HandleUseNixToolsBash) 31 31 http.HandleFunc("/flake.nix/", HandleFlakeNix) 32 32 http.HandleFunc("/flake.zip/", HandleFlakeZip) 33 33 http.HandleFunc("/default.nix/", HandleDefaultNix) ··· 55 55 werr := func(err error) { 56 56 http.Error(w, err.Error(), http.StatusInternalServerError) 57 57 } 58 - path := strings.TrimPrefix(r.URL.Path, "/use_nix_tools.bash") 58 + path := strings.TrimPrefix(r.URL.Path, "/use_nix_tools.sh") 59 59 parts := getParts(path) 60 60 fmt.Println("Gen use_nix_tools_bash: ", parts) 61 61 installables := make([]string, 0) ··· 73 73 } 74 74 75 75 w.Header().Set("Content-Type", "application/x-shellscript") 76 - w.Header().Set("Content-Disposition", "attachment; filename=use_nix_tools.bash") 76 + w.Header().Set("Content-Disposition", "attachment; filename=use_nix_tools.sh") 77 77 w.Header().Set("Cache-Control", "no-cache") 78 78 w.Header().Set("Pragma", "no-cache") 79 79 w.Header().Set("Expires", "0")
+6 -3
web/use_nix_tools.bash web/use_nix_tools.sh
··· 1 - function use_nix_installables { 1 + # -*- mode: sh -*- 2 + # shellcheck shell=bash 3 + 4 + use_nix_installables() { 2 5 direnv_load nix shell "${@}" -c $direnv dump 3 6 } 4 7 5 - function use_nix_tools { 8 + use_nix_tools() { 6 9 declare -a args 7 10 if test -z "${1:-}"; then 8 11 watch_file "$PWD/.nix_tools" 9 - args+=("--read" "${PWD}/.nix_tools") 12 + args+=("--read" "$PWD/.nix_tools") 10 13 fi 11 14 while test -n "$1"; do 12 15 if test -f "$1"; then