From 217e4cb2b0b571f0f0584b360fca417d9418bdb0 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Mon, 26 Feb 2024 16:54:11 -0600 Subject: [PATCH] add nix flake for nix develop shell with direnv --- .envrc | 2 ++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 21 +++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..c06c8fd --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +#!/usr/bin/env direnv +use flake . diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..391d4c2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1708807242, + "narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2ebfeec --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "runtimeterror build environment"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + pkgs = import nixpkgs { system = "x86_64-linux"; }; + in + { + devShells.x86_64-linux.default = pkgs.mkShell { + packages = with pkgs; [ + go + hugo + nodePackages.npm + ]; + }; + }; +} \ No newline at end of file