feat: envrc flake support

This commit is contained in:
Catriel Müller
2026-02-02 18:32:22 -03:00
parent e3f8cc91c4
commit 6e66979f9e
2 changed files with 24 additions and 9 deletions
+4
View File
@@ -0,0 +1,4 @@
# Check if nix command is available before trying to use flake
if command -v nix >/dev/null 2>&1; then
use flake
fi
+12 -1
View File
@@ -19,14 +19,25 @@
in in
{ {
devShells = forEachSystem (pkgs: { devShells = forEachSystem (pkgs: {
default = pkgs.mkShell { default =
let
kilo = pkgs.writeShellScriptBin "kilo" ''
cd "$KILO_ROOT"
exec ${pkgs.bun}/bin/bun dev "$@"
'';
in
pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
bun bun
nodejs_20 nodejs_20
pkg-config pkg-config
openssl openssl
git git
kilo
]; ];
shellHook = ''
export KILO_ROOT="$PWD"
'';
}; };
}); });