fix(nix): make flake more robust, reduce log spam

The `pnpm rebuild` command is critical for a working server build,
so the build should fail if it does not succeed.

pnpm v11 store add prints O(n^2) when adding n packages,
so we pass --silent in the updated pnpm2nix-nzbr fork.
This commit is contained in:
FliegendeWurst
2026-07-25 10:56:59 +02:00
parent 8d0f9ee87c
commit 50fb3e702b
2 changed files with 14 additions and 12 deletions
Generated
+9 -8
View File
@@ -20,15 +20,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1779201759, "lastModified": 1784812282,
"narHash": "sha256-cako3/kPRtMVWkbAJsQHW4MF5Rr8antZXHR4VAO8DHg=", "narHash": "sha256-Na4aTmdz22ovtSvcvNKaRwEWkg801hDyX6t8JqvW+sE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fee0aaa25f0714c7c9281d11054c007a21fd3637", "rev": "6d12004108e0e4a5cfa4bd83b14477f040b15773",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -43,15 +44,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778690633, "lastModified": 1784968304,
"narHash": "sha256-aCw5ZrbO02VTuF+Pf6APotGvDR0dH+0N1HqocK1UhU8=", "narHash": "sha256-NPXKyp40QNCk9r6kavSwqi/zv7OcLgrSRtPmHW+e74w=",
"owner": "TriliumNext", "owner": "FliegendeWurst",
"repo": "pnpm2nix-nzbr", "repo": "pnpm2nix-nzbr",
"rev": "31d00012c26b14303702a35885ccc97943888366", "rev": "9b15300b711a50bb96e553b66aad5cad94df9c7e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "TriliumNext", "owner": "FliegendeWurst",
"ref": "main", "ref": "main",
"repo": "pnpm2nix-nzbr", "repo": "pnpm2nix-nzbr",
"type": "github" "type": "github"
+5 -4
View File
@@ -2,10 +2,10 @@
description = "Trilium Notes (experimental flake)"; description = "Trilium Notes (experimental flake)";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
pnpm2nix = { pnpm2nix = {
url = "github:TriliumNext/pnpm2nix-nzbr/main"; url = "github:FliegendeWurst/pnpm2nix-nzbr/main";
inputs = { inputs = {
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
@@ -303,14 +303,15 @@ nodejs.python
server = makeApp { server = makeApp {
app = "server"; app = "server";
# pnpm throws an error at the end of `pnpm rebuild`, but it doesn't seem to matter: # Important note: if pnpm throws an error similar to the follow at the end of `pnpm rebuild`,
# you should ensure the version of tsx (and other dependencies mentioned in the error) is identical project-wide.
# ERR_PNPM_MISSING_HOISTED_LOCATIONS # ERR_PNPM_MISSING_HOISTED_LOCATIONS
# [email protected](@types/[email protected])([email protected])([email protected])([email protected]) # [email protected](@types/[email protected])([email protected])([email protected])([email protected])
# ([email protected])([email protected])([email protected])([email protected])([email protected]) # ([email protected])([email protected])([email protected])([email protected])([email protected])
# is not found in hoistedLocations inside node_modules/.modules.yaml # is not found in hoistedLocations inside node_modules/.modules.yaml
preBuildCommands = '' preBuildCommands = ''
pushd apps/server pushd apps/server
pnpm rebuild || true pnpm rebuild
popd popd
''; '';
buildTask = "server:build"; buildTask = "server:build";