Refactor server and desktop Nix packaging

- Move shared Node module setup into `packages/common.nix`
- Rename package entrypoints under `packages/server` and `packages/desktop`
- Update flake outputs to expose `t3code-server` as the default
This commit is contained in:
2026-04-24 20:10:05 +03:00
parent f686622bc4
commit 21a137680a
6 changed files with 170 additions and 173 deletions
@@ -0,0 +1,37 @@
diff --git a/apps/desktop/src/updateState.test.ts b/apps/desktop/src/updateState.test.ts
index c2bb4ba1..181c4d55 100644
--- a/apps/desktop/src/updateState.test.ts
+++ b/apps/desktop/src/updateState.test.ts
@@ -116,6 +116,19 @@ describe("getAutoUpdateDisabledReason", () => {
).toContain("T3CODE_DISABLE_AUTO_UPDATE");
});
+ it("explains that env-disabled updates can come from package-managed installs", () => {
+ expect(
+ getAutoUpdateDisabledReason({
+ isDevelopment: false,
+ isPackaged: true,
+ platform: "linux",
+ appImage: undefined,
+ disabledByEnv: true,
+ hasUpdateFeedConfig: true,
+ }),
+ ).toContain("Nix");
+ });
+
it("reports linux non-AppImage builds as disabled", () => {
expect(
getAutoUpdateDisabledReason({
diff --git a/apps/desktop/src/updateState.ts b/apps/desktop/src/updateState.ts
index 928bb408..9ebdf331 100644
--- a/apps/desktop/src/updateState.ts
+++ b/apps/desktop/src/updateState.ts
@@ -43,7 +43,7 @@ export function getAutoUpdateDisabledReason(args: {
return "Automatic updates are only available in packaged production builds.";
}
if (args.disabledByEnv) {
- return "Automatic updates are disabled by the T3CODE_DISABLE_AUTO_UPDATE setting.";
+ return "Automatic updates are disabled by the T3CODE_DISABLE_AUTO_UPDATE setting, which is used for package-managed installs such as Nix.";
}
if (args.platform === "linux" && !args.appImage) {
return "Automatic updates on Linux require running the AppImage build.";