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

+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
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
});
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems =
function: nixpkgs.lib.genAttrs supportedSystems (system: function nixpkgs.legacyPackages.${system});
in
{
overlays.default = final: prev: rec {
nodejs = prev.nodejs_22;
yarn = (prev.yarn.override { inherit nodejs; });
};
devShells = forEachSupportedSystem ({ pkgs }: {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
node2nix nodejs nodePackages.pnpm yarn
python3
nodejs_24
git
curl
jq
ripgrep
fd
python3
];
};
});
formatter = forAllSystems (pkgs: pkgs.nixfmt);
};
}