diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-12-08 12:22:37 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-12-17 20:05:23 -0500 |
commit | 7c0c0e6041fb202a62d764e8f2a617917424b0a3 (patch) | |
tree | 4768d465f2def600b46592d58639495027fbbd2e | |
parent | config_dub.org remove some unused parts (diff) |
.envrc re-adjust & update direnv
- nixDirEnv (a copy of .envrc) used for flake.nix
(getting around an issue that arose when
building project; may revert to direct use of
.envrc)
-rw-r--r-- | .envrc | 3 | ||||
-rw-r--r-- | .envrc-nix | 28 | ||||
-rw-r--r-- | flake.lock | 6 | ||||
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | nixDevEnv.sh | 10 | ||||
-rw-r--r-- | org/config_env.org | 52 | ||||
-rw-r--r-- | org/config_nix.org | 1 | ||||
-rw-r--r-- | org/nixpkgs_overlays_d_related.org | 5 |
8 files changed, 61 insertions, 45 deletions
@@ -4,3 +4,6 @@ fi if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi +if [ -f .envrc-nix ]; then + source_env_if_exists .envrc-nix || source .envrc-nix +fi @@ -1,7 +1,7 @@ NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="2.4.0" -NixDirEnvSHA="sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=" +NixDirEnvVersion="3.0.0" +NixDirEnvSHA="sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg=" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -12,15 +12,21 @@ watch_file makefile watch_file nixDevEnv.sh watch_file .envrc-local watch_file .envrc-nix -nix_direnv_watch_file flake.nix -nix_direnv_watch_file shell.nix -nix_direnv_watch_file nixDevEnv.sh -nix_direnv_watch_file .envrc-local -nix_direnv_watch_file .envrc-nix -nix flake update -nix flake check -nix flake show -echo "" PATH_add result/bin use flake . #use flake .#default +echo " +- consider running: + ❯❯ nix flake show + ❯❯ nix flake update && nix flake check && nix flake show + +- for a dev shell: + ❯❯ nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + +- to build project: + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + - (see nix other/additional build options): + ❯❯ nix flake show +" @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702206697, - "narHash": "sha256-vE9oEx3Y8TO5MnWwFlmopjHd1JoEBno+EhsfUCq5iR8=", + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "29d6c96900b9b576c2fb89491452f283aa979819", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", "type": "github" }, "original": { @@ -240,6 +240,7 @@ epr sigil calibre #(suite includes: ebook-viewer) + koreader foliate ]; inherit shellHook; diff --git a/nixDevEnv.sh b/nixDevEnv.sh index 669d42f..640d07e 100644 --- a/nixDevEnv.sh +++ b/nixDevEnv.sh @@ -1,9 +1,3 @@ -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 -if [ -f .envrc-nix ]; then - source_env_if_exists .envrc-nix || source .envrc-nix +if [ -f .envrc ]; then + source_env_if_exists .envrc || source .envrc fi diff --git a/org/config_env.org b/org/config_env.org index 5d06d74..71445ab 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -24,19 +24,14 @@ #+HEADER: :tangle ../nixDevEnv.sh #+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 -if [ -f .envrc-nix ]; then - source_env_if_exists .envrc-nix || source .envrc-nix +if [ -f .envrc ]; then + source_env_if_exists .envrc || source .envrc fi #+END_SRC ** envrc :envrc: +#+NAME: envrc #+HEADER: :tangle ../.envrc #+BEGIN_SRC sh if [ -f .envrc-git-init ]; then @@ -45,6 +40,9 @@ fi if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi +if [ -f .envrc-nix ]; then + source_env_if_exists .envrc-nix || source .envrc-nix +fi #+END_SRC ** .envrc-nix @@ -70,27 +68,45 @@ watch_file makefile watch_file nixDevEnv.sh watch_file .envrc-local watch_file .envrc-nix -nix_direnv_watch_file flake.nix -nix_direnv_watch_file shell.nix -nix_direnv_watch_file nixDevEnv.sh -nix_direnv_watch_file .envrc-local -nix_direnv_watch_file .envrc-nix -nix flake update -nix flake check -nix flake show -echo "" PATH_add result/bin use flake . #use flake .#default +echo " +- consider running: + ❯❯ nix flake show + ❯❯ nix flake update && nix flake check && nix flake show + +- for a dev shell: + ❯❯ nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + +- to build project: + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + - (see nix other/additional build options): + ❯❯ nix flake show +" #+END_SRC +*** 3.0.0 + #+NAME: direnv-version #+BEGIN_SRC sh -2.4.0 +3.0.0 #+END_SRC #+NAME: direnv-sha #+BEGIN_SRC sh +sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= +#+END_SRC + +*** 2.4.0 + +#+BEGIN_SRC sh +2.4.0 +#+END_SRC + +#+BEGIN_SRC sh sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= #+END_SRC diff --git a/org/config_nix.org b/org/config_nix.org index 6ff0866..225a287 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -263,6 +263,7 @@ epr sigil calibre #(suite includes: ebook-viewer) + koreader foliate ]; inherit shellHook; diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org index fa2ad33..5f85891 100644 --- a/org/nixpkgs_overlays_d_related.org +++ b/org/nixpkgs_overlays_d_related.org @@ -276,11 +276,6 @@ watch_file makefile watch_file nixDevEnv.sh watch_file .envrc-local watch_file .envrc-nix -nix_direnv_watch_file flake.nix -nix_direnv_watch_file shell.nix -nix_direnv_watch_file nixDevEnv.sh -nix_direnv_watch_file .envrc-local -nix_direnv_watch_file .envrc-nix nix flake update nix flake check nix flake show |