chore: modernize Astro Nix development shell

This commit is contained in:
DeCentN2Madness committed 2026-07-28 20:17:04 -07:00
1 parent 96d3c138f6
commit 679731d3e2
2 files changed
+31 -23

No files matched your search

Generated
+10 -8
View File
@@ -2,16 +2,18 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1728018373, "lastModified": 1785090369,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", "narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb", "owner": "NixOS",
"revCount": 688563, "repo": "nixpkgs",
"type": "tarball", "rev": "624af665418d3c65d544145b4d34ad696439570e",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.688563%2Brev-bc947f541ae55e999ffdb4013441347d83b00feb/01925b66-3b70-71bd-b277-924a6c208ba7/source.tar.gz" "type": "github"
}, },
"original": { "original": {
"type": "tarball", "owner": "NixOS",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
+21 -15
View File
@@ -1,29 +1,35 @@
{ {
description = "A Nix-flake-based Node.js development environment"; description = "Arizona Institute for Autism Astro development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: outputs =
{ nixpkgs, ... }:
let let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { "x86_64-linux"
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; "aarch64-linux"
}); "aarch64-darwin"
];
forAllSystems =
function: nixpkgs.lib.genAttrs supportedSystems (system: function nixpkgs.legacyPackages.${system});
in in
{ {
overlays.default = final: prev: rec { devShells = forAllSystems (pkgs: {
nodejs = prev.nodejs_22;
yarn = (prev.yarn.override { inherit nodejs; });
};
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
node2nix nodejs nodePackages.pnpm yarn nodejs_24
python3 git
curl
jq
ripgrep
fd fd
python3
]; ];
}; };
}); });
formatter = forAllSystems (pkgs: pkgs.nixfmt);
}; };
} }