From e81d178e6eee2b7cb322625b7ba44e24028711f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Mon, 22 May 2023 20:35:29 +0900 Subject: [PATCH] feat: added direnv support --- .envrc | 2 ++ .gitignore | 2 +- users/common/devshell.nix | 11 +++++++++++ users/patrick/patrick.nix | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 users/common/devshell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3bf99eb --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +nix_direnv_watch_file ./nix/dev-shell.nix +use flake diff --git a/.gitignore b/.gitignore index 67495f3..6ba9cff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .pre-commit-config.yaml -templates +.direnv diff --git a/users/common/devshell.nix b/users/common/devshell.nix new file mode 100644 index 0000000..66e5f17 --- /dev/null +++ b/users/common/devshell.nix @@ -0,0 +1,11 @@ +{ + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + nix.extraOptions = '' + keep-outputs = true + keep-derivations = true + ''; +} diff --git a/users/patrick/patrick.nix b/users/patrick/patrick.nix index fd6cab5..f9e2214 100644 --- a/users/patrick/patrick.nix +++ b/users/patrick/patrick.nix @@ -3,6 +3,7 @@ ../common/programs/kitty.nix ../common/graphical/hyprland.nix ../common/programs/rofi.nix + ../common/devshell.nix ./ssh.nix ];