Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

nix/module: add ssh configuration options to appview module

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
committer
Tangled
date (May 26, 2026, 9:08 AM +0300) commit 2cd46e69 parent be3052ee change-id ykttkwqo
+37 -1
+37 -1
nix/modules/appview.nix
··· 232 232 }; 233 233 }; 234 234 235 + # ssh log server configuration 236 + ssh = { 237 + enable = mkOption { 238 + type = types.bool; 239 + default = false; 240 + description = "Enable the SSH pipeline log server"; 241 + }; 242 + 243 + listenAddr = mkOption { 244 + type = types.str; 245 + default = "0.0.0.0:3333"; 246 + description = "Listen address for the SSH log server"; 247 + }; 248 + 249 + hostKeyPath = mkOption { 250 + type = types.nullOr types.str; 251 + default = null; 252 + example = "/var/lib/appview/ssh_host_key"; 253 + description = '' 254 + Path to the SSH host key file. If null, an ephemeral key is 255 + generated on each startup. generate with: 256 + 257 + ssh-keygen -t ed25519 -N "" -f /var/lib/appview/ssh_host_key 258 + ''; 259 + }; 260 + }; 261 + 235 262 environmentFile = mkOption { 236 263 type = with types; nullOr path; 237 264 default = null; ··· 285 312 PrivateTmp = true; 286 313 ProtectSystem = "strict"; 287 314 ProtectHome = true; 288 - ReadWritePaths = ["/var/lib/appview"]; 315 + ReadWritePaths = 316 + ["/var/lib/appview"] 317 + ++ optionals (cfg.ssh.enable && cfg.ssh.hostKeyPath != null) [cfg.ssh.hostKeyPath]; 289 318 }; 290 319 291 320 environment = ··· 335 364 336 365 TANGLED_LABEL_DEFAULTS = concatStringsSep "," cfg.label.defaults; 337 366 TANGLED_LABEL_GFI = cfg.label.goodFirstIssue; 367 + } 368 + // optionalAttrs cfg.ssh.enable { 369 + TANGLED_SSH_ENABLED = "true"; 370 + TANGLED_SSH_LISTEN_ADDR = cfg.ssh.listenAddr; 371 + } 372 + // optionalAttrs (cfg.ssh.enable && cfg.ssh.hostKeyPath != null) { 373 + TANGLED_SSH_HOST_KEY_PATH = cfg.ssh.hostKeyPath; 338 374 }; 339 375 }; 340 376 };