From f9be4ab4c1b364481d9f92dc6b5d3306206407c9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 4 Nov 2023 12:35:14 -0400 Subject: nix housekeeping --- org/config_env.org | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'org/config_env.org') 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/<>/direnvrc" "<>" + - ${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 -- cgit v1.2.3