From efa2ae98b93da9467a9d0b735f3df3bd0a23c123 Mon Sep 17 00:00:00 2001 From: aoi Date: Wed, 14 Jan 2026 16:09:04 -0500 Subject: [PATCH 1/2] flake.nix --- build-and-run.sh | 5 +++++ flake.nix | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 build-and-run.sh create mode 100644 flake.nix diff --git a/build-and-run.sh b/build-and-run.sh new file mode 100644 index 0000000..43afb07 --- /dev/null +++ b/build-and-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash +pnpm install +pnpm build +cd apps/web +pnpm preview \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..40f3627 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Dev shell for a PNPM Node.js project"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + outputs = { self, nixpkgs }: let + system = "x86_64-linux"; # adjust for your system + pkgs = import nixpkgs { inherit system; }; + in { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.nodejs # Node.js + pkgs.pnpm # pnpm CLI + pkgs.git # git, optional but handy + ]; + + shellHook = '' + echo "Welcome to your pnpm dev shell!" + echo "Node version: $(node -v)" + echo "PNPM version: $(pnpm -v)" + ''; + }; + }; +} From a971ff65ecbfc2cf846fb773eff2b9e72fec8e1b Mon Sep 17 00:00:00 2001 From: aoi Date: Wed, 14 Jan 2026 19:36:49 -0500 Subject: [PATCH 2/2] airship now works as a nix dev shell and added a helper script to build and run it --- build-and-run.sh | 0 flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 43 +++++++++++++++++++++++++------------------ 3 files changed, 52 insertions(+), 18 deletions(-) mode change 100644 => 100755 build-and-run.sh create mode 100644 flake.lock diff --git a/build-and-run.sh b/build-and-run.sh old mode 100644 new mode 100755 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2972d8a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768127708, + "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", + "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 index 40f3627..dca1873 100644 --- a/flake.nix +++ b/flake.nix @@ -1,24 +1,31 @@ { - description = "Dev shell for a PNPM Node.js project"; + description = "Helius Airship PNPM dev shell"; - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - outputs = { self, nixpkgs }: let - system = "x86_64-linux"; # adjust for your system - pkgs = import nixpkgs { inherit system; }; - in { - devShells.default = pkgs.mkShell { - buildInputs = [ - pkgs.nodejs # Node.js - pkgs.pnpm # pnpm CLI - pkgs.git # git, optional but handy - ]; + outputs = { self, nixpkgs, ... }: + let + system = "x86_64-linux"; # adjust if on macOS + pkgs = import nixpkgs { inherit system; }; + in + { + # This is the key: devShells..default + devShells = { + "${system}" = { + default = pkgs.mkShell { + buildInputs = [ + pkgs.nodejs + pkgs.pnpm + pkgs.git + ]; - shellHook = '' - echo "Welcome to your pnpm dev shell!" - echo "Node version: $(node -v)" - echo "PNPM version: $(pnpm -v)" - ''; + shellHook = '' + echo "Welcome to Helius Airship PNPM dev shell!" + echo "Node version: $(node -v)" + echo "PNPM version: $(pnpm -v)" + ''; + }; + }; + }; }; - }; }