Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(pm/wiki): factor into ingredient #155

merged opened by a.starrysky.fyi targeting main from private/minion/push-wtxryrqunxwq

I want to have a private copy of the wiki on umber and a public copy on teal. It would be good to share configs between them, so we should use an ingredient for this

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3mboah4rydz22
+35 -2
Interdiff #1 โ†’ #2
packetmix/systems/default.nix

This file has not been changed.

packetmix/systems/teal/headscale.nix

This file has not been changed.

packetmix/systems/teal/wiki.nix

This file has not been changed.

+1
packetmix/systems/umber/wiki.nix
··· 4 5 { 6 ingredient.wiki.wiki = { 7 hostname = "wiki.starrysky.fyi"; 8 email = "wiki@starrysky.fyi"; 9 };
··· 4 5 { 6 ingredient.wiki.wiki = { 7 + name = "Starry Sky Wiki"; 8 hostname = "wiki.starrysky.fyi"; 9 email = "wiki@starrysky.fyi"; 10 };
+25 -2
packetmix/systems/wiki/wiki.nix
··· 14 }: 15 { 16 options.ingredient.wiki.wiki = { 17 hostname = lib.mkOption { 18 type = lib.types.str; 19 description = "Where your wiki should be hosted"; ··· 257 webserver = "nginx"; 258 url = "https://${config.ingredient.wiki.wiki.hostname}"; 259 nginx.hostName = config.ingredient.wiki.wiki.hostname; 260 - name = "Freshly Wiki"; 261 - database.createLocally = true; 262 263 passwordSender = config.ingredient.wiki.wiki.email; 264 265 passwordFile = "/secrets/mediawiki/initial_admin_password.txt"; 266 }; 267 268 systemd.timers.mediawiki-maintenance = { 269 wantedBy = [ "timers.target" ];
··· 14 }: 15 { 16 options.ingredient.wiki.wiki = { 17 + name = lib.mkOption { 18 + type = lib.types.str; 19 + description = "What should your wiki be called"; 20 + default = "Freshly Wiki"; 21 + }; 22 hostname = lib.mkOption { 23 type = lib.types.str; 24 description = "Where your wiki should be hosted"; ··· 262 webserver = "nginx"; 263 url = "https://${config.ingredient.wiki.wiki.hostname}"; 264 nginx.hostName = config.ingredient.wiki.wiki.hostname; 265 + inherit (config.ingredient.wiki.wiki) name; 266 + database = { 267 + passwordFile = builtins.toFile "unused-mediawiki-postgress-password" "userpass"; # This isn't actually needed for running a wiki, but some of the initialization scripts do require it. It's not a real password. 268 + createLocally = false; # We can't use createLocally with passwordFile, which is needed during initialization... we'll ensure the database ourself below :( 269 270 + socket = "/run/postgresql"; 271 + }; 272 + 273 passwordSender = config.ingredient.wiki.wiki.email; 274 275 passwordFile = "/secrets/mediawiki/initial_admin_password.txt"; 276 }; 277 + 278 + services.postgresql = { 279 + enable = true; 280 + ensureDatabases = [ config.services.mediawiki.database.name ]; 281 + ensureUsers = [ 282 + { 283 + name = config.services.mediawiki.database.user; 284 + ensureDBOwnership = true; 285 + } 286 + ]; 287 + }; 288 + systemd.services.mediawiki-init.after = [ "postgresql.target" ]; 289 + systemd.services.httpd.after = [ "postgresql.target" ]; 290 291 systemd.timers.mediawiki-maintenance = { 292 wantedBy = [ "timers.target" ];
packetmix/systems/wiki/wiki/CirrusSearch.composer.lock

This file has not been changed.

packetmix/systems/wiki/wiki/CirrusSearch.composer.lock.license

This file has not been changed.

packetmix/systems/wiki/wiki/Elastica.composer.lock

This file has not been changed.

packetmix/systems/wiki/wiki/Elastica.composer.lock.license

This file has not been changed.

packetmix/systems/wiki/wiki/Network.composer.lock

This file has not been changed.

packetmix/systems/wiki/wiki/Network.composer.lock.license

This file has not been changed.

packetmix/systems/wiki/wiki/OpenIDConnect.composer.lock

This file has not been changed.

packetmix/systems/wiki/wiki/OpenIDConnect.composer.lock.license

This file has not been changed.

packetmix/systems/wiki/wiki/favicon.ico

This file has not been changed.

packetmix/systems/wiki/wiki/favicon.ico.license

This file has not been changed.

packetmix/systems/wiki/wiki/icon.svg

This file has not been changed.

packetmix/systems/wiki/wiki/icon.svg.license

This file has not been changed.

+9
packetmix/systems/umber/postgresql.nix
···
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + { 6 + clicks.storage.impermanence.persist.directories = [ 7 + "/var/lib/postgresql" 8 + ]; 9 + }

History

3 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
feat(pm/wiki): factor into ingredient
5/5 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
feat(pm/wiki): factor into ingredient
5/5 success
expand
expand 0 comments
1 commit
expand
feat(pm/wiki): factor into ingredient
1/5 failed, 4/5 success
expand
expand 0 comments