From 035ad35ac77ced409d7cf75d6b0d3a4fe5b5973a Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 29 Sep 2021 12:09:49 +0200 Subject: [PATCH] Replace lorri with nix-direnv --- direnv/.direnvrc | 1 + scripts/.local/share/scripts/direnv-init | 2 +- scripts/.local/share/scripts/project-init | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 direnv/.direnvrc diff --git a/direnv/.direnvrc b/direnv/.direnvrc new file mode 100644 index 0000000..32f3e36 --- /dev/null +++ b/direnv/.direnvrc @@ -0,0 +1 @@ +source /run/current-system/sw/share/nix-direnv/direnvrc diff --git a/scripts/.local/share/scripts/direnv-init b/scripts/.local/share/scripts/direnv-init index 94990dc..e1def42 100755 --- a/scripts/.local/share/scripts/direnv-init +++ b/scripts/.local/share/scripts/direnv-init @@ -1,4 +1,4 @@ #!/bin/sh -lorri init +echo "use flake" >.envrc direnv allow diff --git a/scripts/.local/share/scripts/project-init b/scripts/.local/share/scripts/project-init index 387ac6a..902c995 100755 --- a/scripts/.local/share/scripts/project-init +++ b/scripts/.local/share/scripts/project-init @@ -21,7 +21,7 @@ if [ "$type" = "git" ]; then mkdir src data git add ./* git commit -m "Initial commit" - lorri init + echo "use flake" >.envrc direnv allow elif [ "$type" = "remote-git" ]; then git init @@ -31,7 +31,7 @@ elif [ "$type" = "remote-git" ]; then mkdir src tests data git add ./* git commit -m "Initial commit" - lorri init + echo "use flake" >.envrc direnv allow elif [ "$type" = "doc" ]; then mkdir docs docs/assets @@ -39,7 +39,7 @@ elif [ "$type" = "doc" ]; then elif [ "$type" = "src" ]; then cp ~/Documents/IT/shell.nix . mkdir src data - lorri init + echo "use flake" >.envrc direnv allow else usage