diff options
| -rw-r--r-- | .envrc | 3 | ||||
| -rw-r--r-- | .envrc-git-init | 4 | ||||
| -rw-r--r-- | .envrc-local | 16 | ||||
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | flake.lock | 6 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | org/config_env.org | 48 | ||||
| -rw-r--r-- | org/config_git.org | 4 | ||||
| -rw-r--r-- | org/config_nix.org | 2 | 
9 files changed, 48 insertions, 41 deletions
| @@ -1,3 +1,6 @@ +if [ -f .envrc-git-init ]; then +  source_env_if_exists .envrc-git-init || source .envrc-git-init +fi  if [ -f .envrc-local ]; then    source_env_if_exists .envrc-local || source .envrc-local  fi diff --git a/.envrc-git-init b/.envrc-git-init new file mode 100644 index 0000000..ca74ec3 --- /dev/null +++ b/.envrc-git-init @@ -0,0 +1,4 @@ +if [[ ! -d ./.git ]]; then +  git init +  git add . +fi diff --git a/.envrc-local b/.envrc-local deleted file mode 100644 index d56ab09..0000000 --- a/.envrc-local +++ /dev/null @@ -1,16 +0,0 @@ -if [[ ! -d ./.git ]]; then -  git init -  git add . -fi -echo ' -  .envrc-local echo ❯❯ - -  ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c $SHELL - -  ❯❯ nix develop -  ❯❯ nix develop -c $SHELL -  ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs - -  ❯❯ nix build -  ❯❯ nix build ".#default" --print-build-logs -' @@ -10,8 +10,8 @@  !*.nix  !flake.lock  !.envrc -!.envrc-local  !.envrc-nix +!.envrc-git-init  !.env  !.env/**  !nix-overlays @@ -76,11 +76,11 @@ tmp/**  *_.d  *_.txt  *_ +!.envrc-local_  *.swp  *~  \#*  *.\#* -!.envrc-local_  #!*/  #\#*  #*.\#* @@ -20,11 +20,11 @@      },      "nixpkgs": {        "locked": { -        "lastModified": 1697009197, -        "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=", +        "lastModified": 1699094435, +        "narHash": "sha256-YLZ5/KKZ1PyLrm2MO8UxRe4H3M0/oaYqNhSlq6FDeeA=",          "owner": "NixOS",          "repo": "nixpkgs", -        "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54", +        "rev": "9d5d25bbfe8c0297ebe85324addcb5020ed1a454",          "type": "github"        },        "original": { @@ -245,7 +245,7 @@            inherit shellHook;          };          dsh-html = mkShell { -          name = "spine dev shell for latex & pdf output"; +          name = "spine dev shell for html output";            inherit shell;            inherit devEnv;            packages = [ diff --git a/org/config_env.org b/org/config_env.org index cfd636a..cb24dae 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -24,6 +24,9 @@  #+HEADER: :tangle ../.envrc  #+BEGIN_SRC sh +if [ -f .envrc-git-init ]; then +  source_env_if_exists .envrc-git-init || source .envrc-git-init +fi  if [ -f .envrc-local ]; then    source_env_if_exists .envrc-local || source .envrc-local  fi @@ -35,7 +38,9 @@ fi  ** .envrc-nix  - https://github.com/nix-community/nix-direnv -  - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000=" +  - source_url +    - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv-sha>>" +    - ${NixDirEnvVersion}  #+HEADER: :tangle ../.envrc-nix  #+BEGIN_SRC sh @@ -96,30 +101,20 @@ NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000="  direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc  #+END_SRC -** .envrc-local CHECK MODIFY +** .envrc-git-init -- bespoke modify appropriately and generate if needed - -#+HEADER: :tangle ../.envrc-local +#+HEADER: :tangle ../.envrc-git-init  #+HEADER: :noweb yes  #+BEGIN_SRC sh  if [[ ! -d ./.git ]]; then    git init    git add .  fi -echo ' -  .envrc-local echo ❯❯ - -  ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c $SHELL +#+END_SRC -  ❯❯ nix develop -  ❯❯ nix develop -c $SHELL -  ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs +** .envrc-local CHECK MODIFY -  ❯❯ nix build -  ❯❯ nix build ".#default" --print-build-logs -' -#+END_SRC +- bespoke modify appropriately and generate if needed  #+HEADER: :tangle ../.envrc-local_  #+HEADER: :noweb yes @@ -141,6 +136,27 @@ export SpineDBpath=/var/www/sqlite  #export SpineDBpath=/srv/www/spine/sqlite  #+END_SRC +#+HEADER: :tangle-NO ../.envrc-local +#+HEADER: :noweb yes +#+BEGIN_SRC sh +if [[ ! -d ./.git ]]; then +  git init +  git add . +fi +echo ' +  .envrc-local echo ❯❯ + +  ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c $SHELL + +  ❯❯ nix develop +  ❯❯ nix develop -c $SHELL +  ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs + +  ❯❯ nix build +  ❯❯ nix build ".#default" --print-build-logs +' +#+END_SRC +  #+BEGIN_SRC sh  #export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos  #export NIX_PATH=/srv/nix/nixpkgs diff --git a/org/config_git.org b/org/config_git.org index 671f42e..b0596ac 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -34,8 +34,8 @@  !*.nix  !flake.lock  !.envrc -!.envrc-local  !.envrc-nix +!.envrc-git-init  !.env  !.env/**  !nix-overlays @@ -100,11 +100,11 @@ tmp/**  ,*_.d  ,*_.txt  ,*_ +!.envrc-local_  ,*.swp  ,*~  \#*  ,*.\#* -!.envrc-local_  #!*/  #\#*  #*.\#* diff --git a/org/config_nix.org b/org/config_nix.org index 798d368..0cf55d3 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -268,7 +268,7 @@            inherit shellHook;          };          dsh-html = mkShell { -          name = "spine dev shell for latex & pdf output"; +          name = "spine dev shell for html output";            inherit shell;            inherit devEnv;            packages = [ | 
