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": {
"nixpkgs": {
"locked": {
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"revCount": 688563,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.688563%2Brev-bc947f541ae55e999ffdb4013441347d83b00feb/01925b66-3b70-71bd-b277-924a6c208ba7/source.tar.gz"
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"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
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);
};
}