aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-01-18 21:05:05 +0200
committerKamen Mladenov <kamen@syndamia.com>2025-01-19 07:46:17 +0200
commit3ca7dba628b780ea9ee98eab649f5c9dec058726 (patch)
tree2eaddc53c9c3424968b15f30667a3a197f3397e7
parente9af7ba259281472e299ae06daee361b44cfdb42 (diff)
downloadnowayforward_human-3ca7dba628b780ea9ee98eab649f5c9dec058726.tar
nowayforward_human-3ca7dba628b780ea9ee98eab649f5c9dec058726.tar.gz
nowayforward_human-3ca7dba628b780ea9ee98eab649f5c9dec058726.zip
feat: Move .config to an ignored directory in the repository root
-rw-r--r--.gitignore1
-rw-r--r--shell.nix10
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