From 6f82a84b69fe3c847dae8d0b6a95dd64290f1418 Mon Sep 17 00:00:00 2001 From: randogoth Date: Tue, 29 Sep 2026 16:40:07 +0300 Subject: [PATCH] fix: use stdenv.hostPlatform.system, not the removed pkgs.system nixpkgs renamed it, and the shim warns on every evaluation that imports this module, so the noise lands on consumers rebuilding their systems rather than here. --- README.md | 1 + flake.nix | 2 +- nix/module.nix | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb4cfe4..4a5122b 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,4 @@ What is not verified here: clicking through the actual browser UI. `devbox run s - Rotation is not revocation (§7): a stolen key can rotate onward and the chain validates. The UI surfaces rotations instead of applying them invisibly; out-of-band re-verification is the only defence. - The requests tier is a quota boundary the server enforces, not a filter: it does not refuse anyone's mail outright, which stays the reader's decision after decryption (§5.8). - The bridge binds to 127.0.0.1 by default and has no TLS of its own. Serving it beyond localhost directly is possible but unadvised: the relay is plaintext-agnostic (the traffic is already end-to-end encrypted, but the bridge would relay anyone's bytes to allowlisted ports). The NixOS module's `nginx.enable` puts a TLS-terminating reverse proxy in front instead, which is the deployment path "Deploy" above documents. +- The relay is a proxy and is bounded as one, per the smolmail WebSocket annex: it relays only to allowlisted ports (`--allow-port`, checked per request) and refuses a WebSocket upgrade with a foreign `Origin`, so a page the user happens to visit cannot drive it. The annex's third bound is not implemented: `/tcp/{host}/{port}` dials any host the path names, including the loopback, private and link-local addresses of the machine the bridge runs on, which turns a public deployment into a door into the operator's own network. When implemented, the check belongs on the address the name resolved to, not on the name. diff --git a/flake.nix b/flake.nix index 70e9195..7b4e79b 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ apps = forEachSystem (pkgs: { default = { type = "app"; - program = pkgs.lib.getExe self.packages.${pkgs.system}.default; + program = pkgs.lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.default; }; }); diff --git a/nix/module.nix b/nix/module.nix index f8d0f74..6fc01bc 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -15,8 +15,8 @@ in type = lib.types.package; default = if cfg.presetServer == null - then self.packages.${pkgs.system}.default - else self.packages.${pkgs.system}.default.override { + then self.packages.${pkgs.stdenv.hostPlatform.system}.default + else self.packages.${pkgs.stdenv.hostPlatform.system}.default.override { serverHost = cfg.presetServer.host; serverPublicKey = cfg.presetServer.publicKey; };