about summary refs log tree commit diff
path: root/monzo_ynab
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-27T10·47+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-27T10·59+0000
commit6b224a9e314b6faedd25fc5361a5bb6ac8c3e0a3 (patch)
treeac2eb6daf0d73d4b98a032feac679f5b5840cdd9 /monzo_ynab
parent47a0b45f5f5620aa683f90186008526b8a4c6d68 (diff)
Drop support for lorri
Lorri does not cleanly integrate with my corporate device, which cannot run
NixOS. To expose dependencies to Emacs buffers, I will use nix-buffer.el, which
reads its values from dir-locals.nix. To easily expose dependencies from my
existing shell.nix files into dir-locals.nix, I wrote a Nix utility function.
Diffstat (limited to 'monzo_ynab')
-rw-r--r--monzo_ynab/.envrc9
-rw-r--r--monzo_ynab/dir-locals.nix3
-rw-r--r--monzo_ynab/shell.nix8
3 files changed, 7 insertions, 13 deletions
diff --git a/monzo_ynab/.envrc b/monzo_ynab/.envrc
index 16fd7e76a39c..14829cb12390 100644
--- a/monzo_ynab/.envrc
+++ b/monzo_ynab/.envrc
@@ -1,14 +1,7 @@
-# source_up traversing up directories until it finds the nearest .envrc file,
-# which it uses to extend the environment in this .envrc.
-#
-# Since ../.envrc calls `eval "$(lorri direnv)"`, the buildInputs and variables
-# definitions inside of the attribute set passed to pkgs.mkShell become
-# available here as well.
 source_up
 export monzo_client_id="$(pass show finance/monzo/client-id)"
 export monzo_client_secret="$(pass show finance/monzo/client-secret)"
-export store_path="$(pwd)"
 export ynab_personal_access_token="$(pass show finance/youneedabudget.com/personal-access-token)"
 export ynab_account_id="$(pass show finance/youneedabudget.com/personal-access-token)"
 export ynab_budget_id="$(pass show finance/youneedabudget.com/budget-id)"
-eval "$(lorri direnv)"
+export store_path="$(pwd)"
diff --git a/monzo_ynab/dir-locals.nix b/monzo_ynab/dir-locals.nix
new file mode 100644
index 000000000000..498f4b5055f8
--- /dev/null
+++ b/monzo_ynab/dir-locals.nix
@@ -0,0 +1,3 @@
+let
+  briefcase = import <briefcase> {};
+in briefcase.utils.nixBufferFromShell ./shell.nix
diff --git a/monzo_ynab/shell.nix b/monzo_ynab/shell.nix
index efdc5d3e4233..aab4123bff9a 100644
--- a/monzo_ynab/shell.nix
+++ b/monzo_ynab/shell.nix
@@ -1,11 +1,9 @@
-{ pkgs, briefcase, ... }:
-
-pkgs.mkShell {
+let
+  pkgs = import <nixpkgs> {};
+in pkgs.mkShell {
   buildInputs = [
     pkgs.go
     pkgs.goimports
     pkgs.godef
-    briefcase.monzo_ynab.job
-    briefcase.monzo_ynab.tokens
   ];
 }