From 3ca7dba628b780ea9ee98eab649f5c9dec058726 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 18 Jan 2025 21:05:05 +0200 Subject: feat: Move .config to an ignored directory in the repository root --- .gitignore | 1 + shell.nix | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 632602c..10dd2e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ archives/*.zip +.config diff --git a/shell.nix b/shell.nix index db1054b..5d18df2 100644 --- a/shell.nix +++ b/shell.nix @@ -20,7 +20,10 @@ let # Thanks https://github.com/JianZcar/LAMP-nix-shell-env/blob/main/default.nix shellHook = '' - : ''${MYSQL_HOME:="$HOME/.config/mysql"} + : ''${REPOSITORY:=${builtins.toString ./.}} + export REPOSITORY + + : ''${MYSQL_HOME:="$REPOSITORY/.config/mysql"} : ''${MYSQL_DATADIR:="$MYSQL_HOME/data"} : ''${MYSQL_PID_FILE:="$MYSQL_HOME/mysql.pid"} : ''${MYSQL_UNIX_SOCKET:="$MYSQL_HOME/mysql.sock"} @@ -29,10 +32,9 @@ let : ''${SERVER_ROOT:=${apacheHttpd}} : ''${SERVER_PORT:=8000} - : ''${ROOT_DIR:=$HOME/.config/apache} - : ''${REPOSITORY:=${builtins.getEnv "PWD"}} + : ''${ROOT_DIR:=$REPOSITORY/.config/apache} : ''${PHP_FPM_SOCKET:=$ROOT_DIR/php-fpm.sock} - export SERVER_ROOT SERVER_PORT ROOT_DIR REPOSITORY PHP_FPM_SOCKET + export SERVER_ROOT SERVER_PORT ROOT_DIR PHP_FPM_SOCKET # # Apache2 -- cgit v1.2.3