mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(flake.nix): synchronize playwright version in nix and package.json (#16715)
Ensure that the version of Playwright installed with the Nix flake is equal to the one specified in `site/package.json.` -- This assertion ensures that `pnpm playwright:install` will not attempt to download newer browser versions not present in the Nix image, fixing the startup script and reducing the startup time, as `pnpm playwright:install` will not download or install anything. We also pre-install the required Playwright web browsers in the dogfood Dockerfile. This change prevents us from redownloading system dependencies and Google Chrome each time a workspace starts. Change-Id: I8cc78e842f7d0b1d2a90a4517a186a03636c5559 Signed-off-by: Thomas Kosiewski <tk@coder.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
+5
-4
@@ -50,10 +50,6 @@ let
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
etcReleaseName = writeTextDir "etc/coderniximage-release" ''
|
||||
0.0.0
|
||||
'';
|
||||
|
||||
etcPamdSudoFile = writeText "pam-sudo" ''
|
||||
# Allow root to bypass authentication (optional)
|
||||
auth sufficient pam_rootok.so
|
||||
@@ -115,6 +111,7 @@ let
|
||||
run ? null,
|
||||
maxLayers ? 100,
|
||||
uname ? "nixbld",
|
||||
releaseName ? "0.0.0",
|
||||
}:
|
||||
assert lib.assertMsg (!(drv.drvAttrs.__structuredAttrs or false))
|
||||
"streamNixShellImage: Does not work with the derivation ${drv.name} because it uses __structuredAttrs";
|
||||
@@ -207,6 +204,10 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
etcReleaseName = writeTextDir "etc/coderniximage-release" ''
|
||||
${releaseName}
|
||||
'';
|
||||
|
||||
# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/globals.hh#L464-L465
|
||||
sandboxBuildDir = "/build";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user