From 3788778b4f69348de42e822e1c5aca9fe7442239 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Tue, 29 Oct 2024 22:11:27 -0700 Subject: [PATCH] feat: add devshell and direnv --- .envrc | 1 + .gitignore | 1 + flake.nix | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index b2be92b..4812d58 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ result +.direnv/ diff --git a/flake.nix b/flake.nix index 473c89f..2c183aa 100755 --- a/flake.nix +++ b/flake.nix @@ -125,9 +125,23 @@ }; }; perSystem = - { pkgs, ... }: + { pkgs, system, ... }: { formatter = pkgs.nixfmt-rfc-style; + + devShells.default = pkgs.mkShell { + buildInputs = + with pkgs; + [ + nixd + nixfmt-rfc-style + prettierd + taplo + ] + ++ [ + inputs.viminal.packages.${system}.default + ]; + }; }; }; }