Move env vars into flake

This commit is contained in:
Andreas Zweili 2024-03-11 16:09:08 +01:00
parent 2f0a92adfc
commit 6eb36d9f75
2 changed files with 3 additions and 3 deletions

3
.envrc
View File

@ -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

View File

@ -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}") ];