nixos-wiki-infra/README.md

52 lines
2.4 KiB
Markdown
Raw Normal View History

2023-10-24 17:57:30 +02:00
# nixos-wiki-infra
2024-06-23 02:01:12 +02:00
This project contains the setup of [the official NixOS Wiki (wiki.nixos.org)](https://wiki.nixos.org).
Additionally, [this project's GitHub Issues](https://github.com/NixOS/nixos-wiki-infra/issues) host a space for coordination and discussion of wiki activities, in tandem with [the Matrix channel `#wiki:nixos.org`](https://matrix.to/#/#wiki:nixos.org).
2023-10-24 18:49:26 +02:00
2024-04-01 14:58:41 +02:00
## Examples
2023-11-06 11:26:30 +01:00
2024-04-01 14:58:41 +02:00
Checkout [./targets/nixos-wiki.nixos.org]() for an example terraform deployment on hetzner cloud.
2023-11-06 11:26:30 +01:00
2024-04-01 14:58:41 +02:00
## Downloading a dump of the wiki
2023-10-24 18:52:38 +02:00
2024-04-01 14:58:41 +02:00
This is useful if you want to run your own instance.
Every day an XML dump is updated here:
2023-10-24 18:52:38 +02:00
2024-04-01 14:58:41 +02:00
https://wiki.nixos.org/wikidump.xml.zst
2023-10-24 18:52:38 +02:00
2024-04-01 14:58:41 +02:00
## Restoring from a backup (wiki admins only)
2023-10-24 18:49:26 +02:00
```
2024-04-01 14:58:41 +02:00
$ systemctl stop phpfpm-mediawiki.service
$ borg-job-wiki list
$ borg-job-wiki mount u391032-sub1@u391032.your-storagebox.de:wiki.nixos.org/repo::wiki-wiki-2024-04-01T12:40:37 /tmp/restore
$ ls -la /tmp/restore/var/lib/mediawiki/backup/
$ sudo dropdb db
$ sudo -u postgres dropdb mediawiki
$ systemctl restart postgresql.service
$ sudo -u postgres pg_restore -d mediawiki < /tmp/restore/var/lib/mediawiki/backup/db
$ systemctl start phpfpm-mediawiki.service
$ ls -la /tmp/restore/var/lib/mediawiki-uploads/
$ umount /tmp/restore/
2023-10-24 18:49:26 +02:00
```
2024-04-01 18:42:09 +02:00
2024-04-01 20:13:27 +02:00
## FAQ:
### When logging in with "GitHub auth", the app shows "Act on your behalf" as a permission.
2024-04-01 20:13:27 +02:00
2024-04-02 10:41:27 +02:00
We created the Oauth app with read-only access and minimal permissions:
![](./oauth-permissions.png)
Unfortunately, GitHub misrepresents this information.
2024-04-01 20:13:27 +02:00
Read more about this issue here: https://github.com/orgs/community/discussions/37117
2024-04-04 13:15:01 +02:00
## Roles
Various roles are present on the wiki:
* Bureaucrats can assign roles to others. ([members](https://wiki.nixos.org/w/index.php?title=Special:ListUsers&group=bureaucrat), [permissions](https://wiki.nixos.org/wiki/Special:ListGroupRights#bureaucrat))
* Administrators can perform almost all restricted actions. ([members](https://wiki.nixos.org/w/index.php?title=Special:ListUsers&group=sysop), [permissions](https://wiki.nixos.org/wiki/Special:ListGroupRights#sysop))
* Moderators can perform a limited subset of restricted actions. ([members](https://wiki.nixos.org/w/index.php?title=Special:ListUsers&group=moderator), [permissions](https://wiki.nixos.org/wiki/Special:ListGroupRights#moderator))
* Trusted users can perform page deletions. ([members](https://wiki.nixos.org/w/index.php?title=Special:ListUsers&group=trusted), [permissions](https://wiki.nixos.org/wiki/Special:ListGroupRights#trusted))