Skip to content

Commit

Permalink
add variable NP_LOCATION
Browse files Browse the repository at this point in the history
  • Loading branch information
DavHau committed Mar 12, 2021
1 parent f0c0af5 commit 5e30895
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ In case the automatically selected runtime doesn't work, use the follwing enviro
### Environmant Variables
The following environment variables are optional and can be used to override the default behaviour of running nix-portable
```
NP_DEBUG enable debug logging (to stdout)
NP_MINIMAL Do not automatically install git
NP_RUNTIME which runtime to use (must be either 'bwrap' or 'proot')
NP_BWRAP specify the path to the bwrap executable
NP_PROOT specify the path to the proot executable
NP_RUN override the complete command to run nix
(to use an unsupported runtime, or for debugging)
nix will then be executed like: $NP_RUN {nix-binary} {args...}
NP_DEBUG enable debug logging (to stdout)
NP_MINIMAL do not automatically install git
NP_LOCATION where to put the `.nix-portable` dir. (defaults to `$HOME`)
NP_RUNTIME which runtime to use (must be either 'bwrap' or 'proot')
NP_BWRAP specify the path to the bwrap executable
NP_PROOT specify the path to the proot executable
NP_RUN override the complete command to run nix
(to use an unsupported runtime, or for debugging)
nix will then be executed like: $NP_RUN {nix-binary} {args...}
```
7 changes: 5 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ let
debug(){
[ -n "\$NP_DEBUG" ] && echo \$@ || true
}
dir=\$HOME/.nix-portable
[ -z "\$NP_LOCATION" ] && NP_LOCATION="\$HOME"
dir="\$NP_LOCATION/.nix-portable"
mkdir -p \$dir/bin
Expand All @@ -67,6 +68,8 @@ let
elif [ ! -e /etc/ssl/certs ]; then
debug "/etc/ssl/certs does not exist, using certs from nixpkgs"
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
else
debug "certs seem to reside in /etc/ssl/certs. No need to set up anything"
fi
fi
Expand Down

0 comments on commit 5e30895

Please sign in to comment.