From 6eb36d9f75800799cac0c16710d5ae20c77dca04 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 11 Mar 2024 16:09:08 +0100 Subject: [PATCH] Move env vars into flake --- .envrc | 3 --- flake.nix | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.envrc b/.envrc index 1c9a792..01a265b 100644 --- a/.envrc +++ b/.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 diff --git a/flake.nix b/flake.nix index 0bf5447..d37ea57 100644 --- a/flake.nix +++ b/flake.nix @@ -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}") ];