From 14257fa058e0f5b8f9f9823ee9659ff09d3b375c Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 2 Feb 2025 12:34:09 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9D=84=20Nix=20shell=20using=20flake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5cdf49c --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1738277201, + "narHash": "sha256-6L+WXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "666e1b3f09c267afd66addebe80fb05a5ef2b554", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "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..d7a71d6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + }; + + outputs = inputs@{ nixpkgs, ... }: + let + system = "x86_64-linux"; + in + { + devShells.${system}.default = + let + pkgs = import nixpkgs { + inherit system; + }; + in + pkgs.mkShell { + packages = with pkgs; [ + git + nodejs_22 + pnpm + nodePackages.prettier + ]; + + shellHook = "fish"; + }; + }; +}