feat: flake devshell

Signed-off-by: aprilthepink <aprl@acab.dev>
This commit is contained in:
aprilthepink 2024-05-12 23:58:58 +02:00
parent 6859ab5775
commit a17b9a739e
4 changed files with 75 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

1
.gitignore vendored
View file

@ -181,3 +181,4 @@ glitch.tar.gz
glitch-dev
*.pem
oclif.manifest.json
.direnv/

43
flake.lock Normal file
View file

@ -0,0 +1,43 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1715499532,
"narHash": "sha256-9UJLb8rdi2VokYcfOBQHUzP3iNxOPNWcbK++ENElpk0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "af8b9db5c00f1a8e4b83578acc578ff7d823b786",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

29
flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
outputs = {
systems,
nixpkgs,
...
} @ inputs: let
eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (
system:
f nixpkgs.legacyPackages.${system}
);
in {
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
buildInputs = [
pkgs.bun
pkgs.nodePackages.typescript
pkgs.nodePackages.typescript-language-server
];
};
});
};
}