Move env vars into flake
This commit is contained in:
parent
2f0a92adfc
commit
6eb36d9f75
3
.envrc
3
.envrc
|
@ -2,9 +2,6 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
|
|||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
|
||||
fi
|
||||
|
||||
export WEBPORT=$(($RANDOM + 1100))
|
||||
export PGPORT=$(($WEBPORT + 100))
|
||||
export PROJECT_DIR=$(pwd)
|
||||
|
||||
nix_direnv_watch_file devenv.nix
|
||||
nix_direnv_watch_file devenv.lock
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
modules = [
|
||||
{
|
||||
enterShell = ''
|
||||
export WEBPORT=$(($RANDOM + 1100))
|
||||
export PGPORT=$(($WEBPORT + 100))
|
||||
export PROJECT_DIR=$(pwd)
|
||||
ln -sf ${config.process-managers.process-compose.configFile} ${config.env.DEVENV_ROOT}/process-compose.yml
|
||||
'';
|
||||
packages = [ (pkgs.writeScriptBin "dev" "${builtins.readFile ./dev.sh}") ];
|
||||
|
|
Loading…
Reference in New Issue