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": {
"locked": {
"lastModified": 1779201759,
"narHash": "sha256-cako3/kPRtMVWkbAJsQHW4MF5Rr8antZXHR4VAO8DHg=",
"lastModified": 1784812282,
"narHash": "sha256-Na4aTmdz22ovtSvcvNKaRwEWkg801hDyX6t8JqvW+sE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fee0aaa25f0714c7c9281d11054c007a21fd3637",
"rev": "6d12004108e0e4a5cfa4bd83b14477f040b15773",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -43,15 +44,15 @@
]
},
"locked": {
"lastModified": 1778690633,
"narHash": "sha256-aCw5ZrbO02VTuF+Pf6APotGvDR0dH+0N1HqocK1UhU8=",
"owner": "TriliumNext",
"lastModified": 1784968304,
"narHash": "sha256-NPXKyp40QNCk9r6kavSwqi/zv7OcLgrSRtPmHW+e74w=",
"owner": "FliegendeWurst",
"repo": "pnpm2nix-nzbr",
"rev": "31d00012c26b14303702a35885ccc97943888366",
"rev": "9b15300b711a50bb96e553b66aad5cad94df9c7e",
"type": "github"
},
"original": {
"owner": "TriliumNext",
"owner": "FliegendeWurst",
"ref": "main",
"repo": "pnpm2nix-nzbr",
"type": "github"
+5 -4
View File
@@ -2,10 +2,10 @@
description = "Trilium Notes (experimental flake)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
pnpm2nix = {
url = "github:TriliumNext/pnpm2nix-nzbr/main";
url = "github:FliegendeWurst/pnpm2nix-nzbr/main";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
@@ -303,14 +303,15 @@ nodejs.python
server = makeApp {
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
# [email protected](@types/[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
preBuildCommands = ''
pushd apps/server
pnpm rebuild || true
pnpm rebuild
popd
'';
buildTask = "server:build";