From 9713f9231ea3f0d083c6d0ade69e147cd32b9845 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 22 Mar 2023 13:21:50 +0100 Subject: [PATCH] Add direnv and Nix flake files. --- .envrc | 3 +++ flake.lock | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 13 +++++++++++++ shell.nix | 7 +++++++ 4 files changed, 64 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..b9238c3 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..da65a6c --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1679410443, + "narHash": "sha256-xDHO/jixWD+y5pmW5+2q4Z4O/I/nA4MAa30svnZKK+M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c9ece0059f42e0ab53ac870104ca4049df41b133", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5f8a2c5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..47d3619 --- /dev/null +++ b/shell.nix @@ -0,0 +1,7 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell rec { + packages = [ nodejs nodePackages.pnpm ]; +}