chore: add flake.nix (#294)

This commit is contained in:
Jacob Alford authored and GitHub committed 2026-01-17 13:03:06 +01:00
1 parent 89d1615eda
commit d7b7b204ac
2 files changed
+67

No files matched your search

Generated
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1763464769,
"narHash": "sha256-AJHrsT7VoeQzErpBRlLJM1SODcaayp0joAoEA35yiwM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6f374686605df381de8541c072038472a5ea2e2d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+40
View File
@@ -0,0 +1,40 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { nixpkgs, ... }:
let
eachSystem = f:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system});
in
{
devShells = eachSystem (pkgs:
let
playwright-browsers = pkgs.playwright-driver.browsers.override {
withFirefox = true;
withWebkit = true;
withFfmpeg = false;
};
in
{
default = pkgs.mkShell {
packages = [
pkgs.nodejs_22
pkgs.pnpm
pkgs.nodePackages.typescript
pkgs.nodePackages.typescript-language-server
playwright-browsers
pkgs.playwright-test
];
shellHook = ''
export PLAYWRIGHT_NODEJS_PATH="${pkgs.nodejs_22}/bin/node";
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export PLAYWRIGHT_BROWSERS_PATH="${playwright-browsers}"
export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE="ubuntu-24.04"
'';
};
});
};
}