From 69571dc48dad0043640fc80b1dc6f0b1f8a52be7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 16 Oct 2021 21:10:28 -0400 Subject: nix .envrc related --- .env/echo-nixNote | 231 ++++++++++++++++++++++++++++++++++++++ .env/local_ | 19 ++++ .envrc | 4 +- .envrc-local_ | 248 ----------------------------------------- .gitignore | 4 +- org/config_git.org | 4 +- org/config_nix.org | 44 +++++--- sundry/spine_search_cgi/.envrc | 4 +- 8 files changed, 290 insertions(+), 268 deletions(-) create mode 100644 .env/echo-nixNote create mode 100644 .env/local_ delete mode 100644 .envrc-local_ diff --git a/.env/echo-nixNote b/.env/echo-nixNote new file mode 100644 index 0000000..6ddfe58 --- /dev/null +++ b/.env/echo-nixNote @@ -0,0 +1,231 @@ +echo '-*- mode: org -*- + +* nixpkgs path? + + # eval "$(nix print-dev-env)" +' > nixNote_.org + +echo " == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org + +echo ' +* nix build and show derivation + +#+BEGIN_SRC sh +nix-shell --pure + +nix-build +nix build -f default.nix +nix shell -f default.nix +nix-instantiate | nix-build +nix build `nix-instantiate` + +nix develop + +nix-instantiate | nix show-derivation | jq +nix-instantiate | nix show-derivation --recursive | jq + +nix search --json 2>/dev/null |jq +#+END_SRC + +* version and build info + +#+BEGIN_SRC sh' >> nixNote_.org + +echo 'spine version (git) == $SpineVER' >> nixNote_.org +echo "spine version (git) == $SpineVER" >> nixNote_.org +echo 'nix-instantiate == `nix-instantiate`' >> nixNote_.org +echo "nix-instantiate == `nix-instantiate`" >> nixNote_.org + +echo "#+END_SRC + +* initialised shell variables + +#+BEGIN_SRC sh +SpineSRC=$SpineSRC +SpineDOC=$SpineDOC +SpinePOD=$SpinePOD +SpineOUTversioned=$SpineOUTversioned +SpineOUT=$SpineOUT +#+END_SRC +" >> nixNote_.org + +echo '* spine run instruction examples +** parallelized tasks +*** doc source + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** html & epub output + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** sqlite db for each document - populate each db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** doc source; html, epub; sqlite outputs + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** curate (authors topics) + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** html, curate + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --dark --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/* +$SpineBIN/spine --very-verbose --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** composite command: source pod, html, epub, curate, sqlite + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +** sequential tasks +*** sqlite db (shared) - create db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" +#+END_SRC + +*** sqlite db (shared) - populate db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/* +#+END_SRC + +*** sqlite db (shared) - drop db + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned" +#+END_SRC + +*** sqlite db (shared) - create & populate db (single step) + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +*** composite command: source pod, html, epub, curate, sqlite + +#+BEGIN_SRC sh +$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* +#+END_SRC + +** config [./pod/].dr/config_local_site + +#+BEGIN_SRC sh +cat $SpinePOD/.dr/config_local_site +$SpineBIN/spine --show-config $SpinePOD +$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD +#+END_SRC + +** cgi operations (output to $SpineOUT /var/www) + +#+BEGIN_SRC sh +$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* + +$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* + +$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr + +$SpineBIN/spine --html $SpinePOD/* + + +$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site +#+END_SRC + +*** generate html linked to search form + +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --output=$SpineOUT $SpinePOD/* +#+END_SRC + +*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) + +#+BEGIN_SRC sh +$SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" +$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" +#+END_SRC + +*** populate sqlite db + +#+BEGIN_SRC sh +$SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUT $SpinePOD/* +#+END_SRC + +*** generate html (linked to search form), sql output, curate COMPOSITE + +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/* +$SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/* +#+END_SRC + +*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration + +if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site + +#+BEGIN_SRC sh +$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/* +#+END_SRC + +#+BEGIN_SRC yaml +# sample resource configuration file ( $SpinePOD/.rc/config_local_site ) +output: + path: "/srv/www/spine" +default: + language: "en" + papersize: "a4" + text_wrap: "80" + digest: "sha256" +webserv: + http: "http" + domain: "localhost" + data_http: "http" + data_domain: "localhost" + data_root_url: "https://sisudoc.org" + data_root_path: "/srv/www/spine" + images_root_part: "image" + cgi_search_form_title: "≅ SiSU Spine search" + cgi_http: "https" + cgi_domain: "sisudoc.org" + cgi_bin_url: "http://sisudoc.org/cgi-bin" + cgi_bin_part: "cgi-bin" + cgi_bin_path: "/var/www/cgi/cgi-bin" + cgi_search_script: "spine_search" + cgi_action: "https://sisudoc.org/spine_search" + db_sqlite_filename: "spine.search.db" + db_sqlite_path: "/var/www/sqlite" +#+END_SRC + +*** make search form + +#+BEGIN_SRC sh +$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site +#+END_SRC + +*** latex + +#+BEGIN_SRC sh +$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/* +ls $SpineOutstatic/latex/*.tex +#+END_SRC +' >> nixNote_.org + +#cat nixNote_.org + +#echo "emacs nixNote_.org" +#echo "cat nixNote_.org" diff --git a/.env/local_ b/.env/local_ new file mode 100644 index 0000000..966c673 --- /dev/null +++ b/.env/local_ @@ -0,0 +1,19 @@ +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#export NIX_PATH=/nixpkgs-ra/nixpkgs +# reload when these files change +# watch_file flake.nix +# watch_file flake.lock +## load the flake devShell +# eval "$(nix print-dev-env)" +# echo $NIX_BUILD_TOP +export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') +export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform +export SpineBIN=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin +export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples +export SpinePOD=$SpineDOC/markup/pod +export SpineOUTversioned=/srv/www/spine/$SpineVER +export SpineOUT=/srv/www/spine +export SpineDBpath=/var/www/sqlite +if [ -e .env/echo-nixNote ]; then + source .env/echo-nixNote +fi diff --git a/.envrc b/.envrc index 03af170..72eefc7 100644 --- a/.envrc +++ b/.envrc @@ -3,6 +3,6 @@ if ! has nix_direnv_version || ! nix_direnv_version 1.4.0; then # https://github.com/nix-community/nix-direnv source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.4.0/direnvrc" "sha256-4XfVDjv75eHMWN4G725VW7BoOV4Vl3vAabK4YXIfPyE=" fi -if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local - source .envrc-local +if [ -e .env/local ]; then # source an additional user-specific .envrc in ./.env/local + source .env/local fi diff --git a/.envrc-local_ b/.envrc-local_ deleted file mode 100644 index 9bc7338..0000000 --- a/.envrc-local_ +++ /dev/null @@ -1,248 +0,0 @@ -export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos -#export NIX_PATH=/nixpkgs-ra/nixpkgs -# reload when these files change -# watch_file flake.nix -# watch_file flake.lock -## load the flake devShell -# eval "$(nix print-dev-env)" -# echo $NIX_BUILD_TOP -export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') -export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform -export SpineBIN=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/result/bin -export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples -export SpinePOD=$SpineDOC/markup/pod -export SpineOUTversioned=/srv/www/spine/$SpineVER -export SpineOUT=/srv/www/spine -export SpineDBpath=/var/www/sqlite - -echo '-*- mode: org -*- - -* nixpkgs path? - - # eval "$(nix print-dev-env)" -' > nixNote_.org - -echo " == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org - -echo ' -* nix build and show derivation - -#+BEGIN_SRC sh -nix-shell --pure - -nix-build -nix build -f default.nix -nix shell -f default.nix -nix-instantiate | nix-build -nix build `nix-instantiate` - -nix develop - -nix-instantiate | nix show-derivation | jq -nix-instantiate | nix show-derivation --recursive | jq - -nix search --json 2>/dev/null |jq -#+END_SRC - -* version and build info - -#+BEGIN_SRC sh' >> nixNote_.org - -echo 'spine version (git) == $SpineVER' >> nixNote_.org -echo "spine version (git) == $SpineVER" >> nixNote_.org -echo 'nix-instantiate == `nix-instantiate`' >> nixNote_.org -echo "nix-instantiate == `nix-instantiate`" >> nixNote_.org - -echo "#+END_SRC - -* initialised shell variables - -#+BEGIN_SRC sh -SpineSRC=$SpineSRC -SpineDOC=$SpineDOC -SpinePOD=$SpinePOD -SpineOUTversioned=$SpineOUTversioned -SpineOUT=$SpineOUT -#+END_SRC -" >> nixNote_.org - -echo '* spine run instruction examples -** parallelized tasks -*** doc source - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** html & epub output - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** sqlite db for each document - populate each db - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** doc source; html, epub; sqlite outputs - -#+BEGIN_SRC sh -$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** curate (authors topics) - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** html, curate - -#+BEGIN_SRC sh -$SpineBIN/spine --verbose --dark --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/* -$SpineBIN/spine --very-verbose --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** composite command: source pod, html, epub, curate, sqlite - -#+BEGIN_SRC sh -$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -** sequential tasks -*** sqlite db (shared) - create db - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned" -#+END_SRC - -*** sqlite db (shared) - populate db - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/* -#+END_SRC - -*** sqlite db (shared) - drop db - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned" -#+END_SRC - -*** sqlite db (shared) - create & populate db (single step) - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -*** composite command: source pod, html, epub, curate, sqlite - -#+BEGIN_SRC sh -$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/* -#+END_SRC - -** config [./pod/].dr/config_local_site - -#+BEGIN_SRC sh -cat $SpinePOD/.dr/config_local_site -$SpineBIN/spine --show-config $SpinePOD -$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD -#+END_SRC - -** cgi operations (output to $SpineOUT /var/www) - -#+BEGIN_SRC sh -$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/* - -$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* - -$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr - -$SpineBIN/spine --html $SpinePOD/* - - -$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site -#+END_SRC - -*** generate html linked to search form - -#+BEGIN_SRC sh -$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --output=$SpineOUT $SpinePOD/* -#+END_SRC - -*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate) - -#+BEGIN_SRC sh -$SpineBIN/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" -$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath" -#+END_SRC - -*** populate sqlite db - -#+BEGIN_SRC sh -$SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUT $SpinePOD/* -#+END_SRC - -*** generate html (linked to search form), sql output, curate COMPOSITE - -#+BEGIN_SRC sh -$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/* -$SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/* -#+END_SRC - -*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration - -if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site - -#+BEGIN_SRC sh -$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/* -#+END_SRC - -#+BEGIN_SRC yaml -# sample resource configuration file ( $SpinePOD/.rc/config_local_site ) -output: - path: "/srv/www/spine" -default: - language: "en" - papersize: "a4" - text_wrap: "80" - digest: "sha256" -webserv: - http: "http" - domain: "localhost" - data_http: "http" - data_domain: "localhost" - data_root_url: "https://sisudoc.org" - data_root_path: "/srv/www/spine" - images_root_part: "image" - cgi_search_form_title: "≅ SiSU Spine search" - cgi_http: "https" - cgi_domain: "sisudoc.org" - cgi_bin_url: "http://sisudoc.org/cgi-bin" - cgi_bin_part: "cgi-bin" - cgi_bin_path: "/var/www/cgi/cgi-bin" - cgi_search_script: "spine_search" - cgi_action: "https://sisudoc.org/spine_search" - db_sqlite_filename: "spine.search.db" - db_sqlite_path: "/var/www/sqlite" -#+END_SRC - -*** make search form - -#+BEGIN_SRC sh -$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site -#+END_SRC - -*** latex - -#+BEGIN_SRC sh -$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/* -ls $SpineOutstatic/latex/*.tex -#+END_SRC -' >> nixNote_.org - -#cat nixNote_.org - -#echo "emacs nixNote_.org" -#echo "cat nixNote_.org" diff --git a/.gitignore b/.gitignore index 2b3f883..a0eb6c8 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,9 @@ tmp/** *~ \#* *.\#* -!.envrc-local_ +!.env +!.env/local_ +!.env/echo-nixNote #!*/ #\#* #*.\#* diff --git a/org/config_git.org b/org/config_git.org index a67cacd..77fc36e 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -94,7 +94,9 @@ tmp/** ,*~ \#* ,*.\#* -!.envrc-local_ +!.env +!.env/local_ +!.env/echo-nixNote #!*/ #\#* #*.\#* diff --git a/org/config_nix.org b/org/config_nix.org index 2fd932c..c5bd8dd 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -78,8 +78,8 @@ if ! has nix_direnv_version || ! nix_direnv_version 1.4.0; then # https://github.com/nix-community/nix-direnv source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.4.0/direnvrc" "sha256-4XfVDjv75eHMWN4G725VW7BoOV4Vl3vAabK4YXIfPyE=" fi -if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local - source .envrc-local +if [ -e .env/local ]; then # source an additional user-specific .envrc in ./.env/local + source .env/local fi #+END_SRC @@ -94,8 +94,8 @@ else # fallback prevent bootstrapping problems by using direnv's builtin nix sup use nix NIX_ENFORCE_PURITY=0 fi -if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local - source .envrc-local +if [ -e .env/local ]; then # source an additional user-specific .envrc in ./.env/local + source .env/local fi #+END_SRC @@ -125,18 +125,18 @@ else use nix NIX_ENFORCE_PURITY=0 fi - # source an additional user-specific .envrc in ./.envrc-local - if [ -e .envrc-local ]; then - source .envrc-local + # source an additional user-specific .envrc in ./.env/local + if [ -e .env/local ]; then + source .env/local fi fi #+END_SRC -**** .envrc-local CHECK MODIFY +**** .env/local CHECK MODIFY - bespoke modify appropriately and generate if needed -#+HEADER: :tangle ../.envrc-local_ +#+HEADER: :tangle ../.env/local_ #+BEGIN_SRC sh export NIX_PATH=<> #export NIX_PATH=<> @@ -154,7 +154,15 @@ export SpinePOD=$SpineDOC/markup/pod export SpineOUTversioned=<> export SpineOUT=<> export SpineDBpath=<> +if [ -e .env/echo-nixNote ]; then + source .env/echo-nixNote +fi +#+END_SRC +**** .env/echo-nixNote CHECK MODIFY + +#+HEADER: :tangle ../.env/echo-nixNote +#+BEGIN_SRC sh echo '-*- mode: org -*- ,* nixpkgs path? @@ -665,7 +673,7 @@ pkgs.mkShell { #+BEGIN_SRC sh nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs -nix-build -I .envrc-local +nix-build -I .env/local nix-build -I .envrc default.nix -I .envrc default.nix @@ -911,14 +919,14 @@ if ! has nix_direnv_version || ! nix_direnv_version 1.4.0; then # https://github.com/nix-community/nix-direnv source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.4.0/direnvrc" "sha256-4XfVDjv75eHMWN4G725VW7BoOV4Vl3vAabK4YXIfPyE=" fi -if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local - source .envrc-local +if [ -e .env/local ]; then # source an additional user-specific .envrc in ./.env/local + source .env/local fi #+END_SRC -**** .envrc-local +**** .env/local -#+HEADER: :tangle "../sundry/spine_search_cgi/.envrc-local_" +#+HEADER: :tangle "../sundry/spine_search_cgi/.env/local_" #+BEGIN_SRC sh export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos #export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs @@ -937,7 +945,15 @@ export SpinePOD=$SpineDOC/markup/pod export SpineOUT=<> export SpineDBpath=<> export SpineCgiBIN=<> +if [ -e .env/echo-nixNote ]; then # source an additional user-specific .envrc in ./.env/local + source .env/echo-nixNote +fi +#+END_SRC +**** .env/local + +#+HEADER: :tangle "../sundry/spine_search_cgi/.env/echo-nixNote" +#+BEGIN_SRC sh echo '-*- mode: org -*- ,* nixpkgs path? diff --git a/sundry/spine_search_cgi/.envrc b/sundry/spine_search_cgi/.envrc index 03af170..72eefc7 100644 --- a/sundry/spine_search_cgi/.envrc +++ b/sundry/spine_search_cgi/.envrc @@ -3,6 +3,6 @@ if ! has nix_direnv_version || ! nix_direnv_version 1.4.0; then # https://github.com/nix-community/nix-direnv source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.4.0/direnvrc" "sha256-4XfVDjv75eHMWN4G725VW7BoOV4Vl3vAabK4YXIfPyE=" fi -if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local - source .envrc-local +if [ -e .env/local ]; then # source an additional user-specific .envrc in ./.env/local + source .env/local fi -- cgit v1.2.3