apply treemft

This commit is contained in:
Jörg Thalheim 2024-07-06 11:13:43 +02:00 committed by mergify[bot]
parent ffc543701b
commit d10e4f8977
7 changed files with 55 additions and 46 deletions

View File

@ -1,6 +1,6 @@
# Go to https://gitlab.com/-/profile/personal_access_tokens
export GITLAB_USER=<your-gitlab-username>
export GITLAB_TOKEN=<your-gitlab-token>
export GITLAB_USER='<your-gitlab-username>'
export GITLAB_TOKEN='<your-gitlab-token>'
# https://console.hetzner.cloud/projects/2643361/security/tokens
export HCLOUD_TOKEN=<your-hetzner-token>
export HCLOUD_TOKEN='<your-hetzner-token>'

View File

@ -3,7 +3,6 @@ keys:
- &nixos-wiki2 age1p3dl7q5ahjdhl3g72mqk9pxy3gcptw9dqmg6syq9f9s03ppqp4rsqm93n2
- &lassulus age1eq0e6uhjj2tja8v338tkdz8ema2aw5anpuyaq2uru7rt4lq7msyqqut6m2
- &julienmalka age109qksyjgdnf7elnk98dh4vtxt0epju7xjemlqng0j0x75st5zg9qm9h3hy
creation_rules:
- path_regex: targets/nixos-wiki\.nixos\.org/secrets/*
key_groups:

View File

@ -1,26 +1,20 @@
The MIT License (MIT)
=====================
# The MIT License (MIT)
Copyright © `2023` `Jörg Thalheim`
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,17 +1,22 @@
# nixos-wiki-infra
This project contains the setup of [the official NixOS Wiki (wiki.nixos.org)](https://wiki.nixos.org).
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).
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).
## Examples
Checkout [./targets/nixos-wiki.nixos.org]() for an example terraform deployment on hetzner cloud.
Checkout [./targets/nixos-wiki.nixos.org]() for an example terraform deployment
on hetzner cloud.
## Downloading a dump of the wiki
This is useful if you want to run your own instance.
Every day an XML dump is updated here:
This is useful if you want to run your own instance. Every day an XML dump is
updated here:
https://wiki.nixos.org/wikidump.xml.zst
@ -39,13 +44,22 @@ We created the Oauth app with read-only access and minimal permissions:
![](./oauth-permissions.png)
Unfortunately, GitHub misrepresents this information.
Read more about this issue here: https://github.com/orgs/community/discussions/37117
Unfortunately, GitHub misrepresents this information. Read more about this issue
here: https://github.com/orgs/community/discussions/37117
## 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))
- 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))

View File

@ -70,7 +70,10 @@ def mirror_extension(extension_name: str, mediawiki_version: str) -> Extension:
run(["gh", "release", "upload", base_name, f"{tmpdir}/{base_name}"])
for i in range(30):
try:
data = run(["nix", "store", "prefetch-file", "--unpack", mirror_url, "--json"], stdout=subprocess.PIPE).stdout.strip()
data = run(
["nix", "store", "prefetch-file", "--unpack", mirror_url, "--json"],
stdout=subprocess.PIPE,
).stdout.strip()
hash = json.loads(data)["hash"]
except subprocess.CalledProcessError:
# sometimes github takes a while to make releases available

View File

@ -5,4 +5,3 @@ cd "$(dirname "$0")"
rm -f .terraform.lock.hcl
tofu init -backend-config="password=$GITLAB_TOKEN" -backend-config="username=$GITLAB_USER"
tofu apply "$@"