-
Notifications
You must be signed in to change notification settings - Fork 13
/
flake.nix
53 lines (44 loc) · 1.46 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
devenv.url = "github:cachix/devenv";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
];
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, lib, system, ... }:
let
nodejs = pkgs.nodejs_20;
python = pkgs.python311;
in
{
packages.default = pkgs.hello;
devenv.shells.default = {
# https://devenv.sh/reference/options/
languages.nix.enable = true;
languages.javascript.enable = true;
languages.javascript.package = nodejs;
languages.typescript.enable = true;
languages.python.enable = true;
languages.python.package = python.withPackages (p: with p; [
requests
ruamel-yaml
pydantic
]);
packages = [
config.packages.default
pkgs.sqlite
pkgs.playwright-driver
pkgs.nodePackages.zx
];
env.PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
env.PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true";
processes.web.exec = "cd $DEVENV_ROOT/web/; yarn run dev";
scripts.download.exec = "$DEVENV_ROOT/scripts/download.mjs";
};
};
};
}