feat: add nix flake

This commit is contained in:
Max Koon
2025-10-10 09:39:53 -04:00
parent 88ac6185c4
commit 0446893a67
4 changed files with 50 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

2
.gitignore vendored
View File

@@ -41,3 +41,5 @@ app-example
# generated native folders # generated native folders
/ios /ios
/android /android
.direnv/

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1759977445,
"narHash": "sha256-LYr4IDfuihCkFAkSYz5//gT2r1ewcWBYgd5AxPzPLIo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2dad7af78a183b6c486702c18af8a9544f298377",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View File

@@ -0,0 +1,20 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = {nixpkgs, ...}: let
forAllSystems = function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed
(system: function nixpkgs.legacyPackages.${system});
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
corepack
nodejs_22
];
};
});
};
}