commit e87b4629c80bb1338f35b24e21f05d0b89990038
parent ac366a589f6c23ff262aaaa27ab04bcd794544a2
Author: Silas Brack <silasbrack@gmail.com>
Date: Sat, 13 Jun 2026 13:44:28 +0200
chore: update simple-web-app (ADDR/SMTP_ADDR env vars)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -318,11 +318,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
- "lastModified": 1781350540,
- "narHash": "sha256-/FZsulOC80un9siVg3MlpDtJS2Robc9YvnDCOpfvJOA=",
+ "lastModified": 1781350985,
+ "narHash": "sha256-z+dsE+qtflmj0mCzRTtYvZVmAwMGHOZayQr3oIHFCzU=",
"ref": "refs/heads/main",
- "rev": "df1a5a44600e1f0aa0820c59f32d2fc59a194734",
- "revCount": 153,
+ "rev": "654245fbe3ef2deb0fe87b9a54646726a7cdfec2",
+ "revCount": 154,
"type": "git",
"url": "ssh://forgejo@git.fnarglebeast.com/silas/simple-web-app.git"
},
diff --git a/modules/simple-web-app.nix b/modules/simple-web-app.nix
@@ -19,10 +19,10 @@ in
defaultText = lib.literalMD "`packages.default` from the simple-web-app flake";
};
- port = mkOption {
- type = types.int;
- default = 8000;
- description = "The port to bind the server to.";
+ addr = mkOption {
+ type = types.str;
+ default = "0.0.0.0:8000";
+ description = "Address to bind the server to.";
};
dbPath = mkOption {
@@ -47,23 +47,20 @@ in
StateDirectoryMode = "0755";
};
environment = {
- PORT = builtins.toString cfg.port;
+ ADDR = cfg.addr;
DEBUG = "false";
DB_PATH = cfg.dbPath;
- SMTP_HOST = "localhost";
- SMTP_PORT = "25";
+ SMTP_ADDR = "localhost:25";
SMTP_FROM = "noreply@silasbrack.com";
SITE_URL = "https://simple.fnarglebeast.com";
- RUST_LOG = "info";
};
};
- networking.firewall.allowedTCPPorts = [ cfg.port ];
services.nginx.virtualHosts."simple.fnarglebeast.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
- proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}";
+ proxyPass = "http://127.0.0.1:8000";
recommendedProxySettings = true;
};
};