Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

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

nix/modules: update knot module options

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

authored by

Anirudh Oppiliappan and committed by
Tangled
9ffd688e 1dc3323a

+56 -2
+56 -2
nix/modules/knot.nix
··· 51 51 description = "Path where repositories are scanned from"; 52 52 }; 53 53 54 + readme = mkOption { 55 + type = types.listOf types.str; 56 + default = [ 57 + "README.md" 58 + "readme.md" 59 + "README" 60 + "readme" 61 + "README.markdown" 62 + "readme.markdown" 63 + "README.txt" 64 + "readme.txt" 65 + "README.rst" 66 + "readme.rst" 67 + "README.org" 68 + "readme.org" 69 + "README.asciidoc" 70 + "readme.asciidoc" 71 + ]; 72 + description = "List of README filenames to look for (in priority order)"; 73 + }; 74 + 54 75 mainBranch = mkOption { 55 76 type = types.str; 56 77 default = "main"; 57 78 description = "Default branch name for repositories"; 79 + }; 80 + }; 81 + 82 + git = { 83 + userName = mkOption { 84 + type = types.str; 85 + default = "Tangled"; 86 + description = "Git user name used as committer"; 87 + }; 88 + 89 + userEmail = mkOption { 90 + type = types.str; 91 + default = "noreply@tangled.org"; 92 + description = "Git user email used as committer"; 58 93 }; 59 94 }; 60 95 ··· 156 121 type = types.str; 157 122 default = "wss://jetstream1.us-west.bsky.network/subscribe"; 158 123 description = "Jetstream endpoint to subscribe to"; 124 + }; 125 + 126 + logDids = mkOption { 127 + type = types.bool; 128 + default = true; 129 + description = "Enable logging of DIDs"; 159 130 }; 160 131 161 132 dev = mkOption { ··· 231 190 mkdir -p "${cfg.stateDir}/.config/git" 232 191 cat > "${cfg.stateDir}/.config/git/config" << EOF 233 192 [user] 234 - name = Git User 235 - email = git@example.com 193 + name = ${cfg.git.userName} 194 + email = ${cfg.git.userEmail} 236 195 [receive] 237 196 advertisePushOptions = true 238 197 [uploadpack] ··· 248 207 WorkingDirectory = cfg.stateDir; 249 208 Environment = [ 250 209 "KNOT_REPO_SCAN_PATH=${cfg.repo.scanPath}" 210 + "KNOT_REPO_README=${concatStringsSep "," cfg.repo.readme}" 251 211 "KNOT_REPO_MAIN_BRANCH=${cfg.repo.mainBranch}" 212 + "KNOT_GIT_USER_NAME=${cfg.git.userName}" 213 + "KNOT_GIT_USER_EMAIL=${cfg.git.userEmail}" 252 214 "APPVIEW_ENDPOINT=${cfg.appviewEndpoint}" 253 215 "KNOT_SERVER_INTERNAL_LISTEN_ADDR=${cfg.server.internalListenAddr}" 254 216 "KNOT_SERVER_LISTEN_ADDR=${cfg.server.listenAddr}" ··· 260 216 "KNOT_SERVER_PLC_URL=${cfg.server.plcUrl}" 261 217 "KNOT_SERVER_JETSTREAM_ENDPOINT=${cfg.server.jetstreamEndpoint}" 262 218 "KNOT_SERVER_OWNER=${cfg.server.owner}" 219 + "KNOT_SERVER_LOG_DIDS=${ 220 + if cfg.server.logDids 221 + then "true" 222 + else "false" 223 + }" 224 + "KNOT_SERVER_DEV=${ 225 + if cfg.server.dev 226 + then "true" 227 + else "false" 228 + }" 263 229 ]; 264 230 ExecStart = "${cfg.package}/bin/knot server"; 265 231 Restart = "always";