From 7b2e19ea71ac1c792cc49743f85a5dc2b43245a5 Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 26 Jan 2024 19:46:26 +0100 Subject: [PATCH] Add Nix flake and direnv files. --- .envrc | 3 +++ .gitignore | 3 ++- Makefile.toml | 5 +++++ flake.lock | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 13 ++++++++++++ shell.nix | 8 +++++++ 6 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 Makefile.toml 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/.gitignore b/.gitignore index b8c4392..145b228 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -node_modules/ +.direnv/ .turbo/ +node_modules/ diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..1d2b209 --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,5 @@ +# Run the turbo lint task. +[tasks.lint] +clear = true +command = "turbo" +args = ["run", "lint"] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4c781a9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,59 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1706173671, + "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4fddc9be4eaf195d631333908f2a454b03628ee5", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "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..2015bee --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell rec { + # Uncomment turbo when the build failures are fixed. + packages = [ cargo-make nodejs nodePackages.pnpm /*turbo*/ ]; +}