From b4b3af66955b4bbb6ae404a42467ba4eb03ea016 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 2 Jun 2025 15:13:53 -0700 Subject: [PATCH] Init direnv and flake.nix --- .envrc | 3 +++ flake.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .envrc create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..9346ba8 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +#source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k=" +#use devenv +use flake diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ffc53ea --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + description = "Lifetracker"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = + { nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem ( + system: + let + inherit (pkgs.lib) optional optionals; + pkgs = import nixpkgs { inherit system; }; + + in + with pkgs; + { + devShell = pkgs.mkShell { + buildInputs = + [ + bashInteractive + glibcLocales + git + nodejs + pnpm + postgresql + netlify-cli + ] + ++ optional stdenv.isLinux inotify-tools + ++ optional stdenv.isDarwin terminal-notifier + ++ optionals stdenv.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + CoreFoundation + CoreServices + ] + ); + }; + } + ); +}