feat(webdev): Add flake

This commit is contained in:
Tibo De Peuter 2024-12-28 21:03:48 +01:00
parent 75e0ad6954
commit 5a276cf483
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 97 additions and 0 deletions

36
webdev/flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
description = ''
Web development flake
'';
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
( system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs
playwright-driver.browsers
# IDE's
(jetbrains.plugins.addPlugins jetbrains.webstorm [ "github-copilot" ])
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
});
}