From 9e481f20daa5405a47bf8964c5e4451cc22176dd Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 26 Jan 2025 18:59:08 +0100 Subject: [PATCH] Add nix flake --- .envrc | 1 + flake.lock | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 17 ++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc index a8a7606..d4b93ce 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ +use flake layout node diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d765e11 --- /dev/null +++ b/flake.lock @@ -0,0 +1,57 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 0, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", + "path": "/nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..58cd281 --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + inputs = { + utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + nodejs + ]; + }; + } + ); +}