Compare commits

...
Sign in to create a new pull request.

63 commits

Author SHA1 Message Date
736856cea6
Merge pull request 'mediawiki: 1.42.4 -> 1.43.0' (#301) from mediawiki-1.43.0 into main
Reviewed-on: #301
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
2025-02-13 17:30:50 +00:00
79ed3ff604
mediawiki: 1.42.4 -> 1.43.0
All checks were successful
Flake checks / Check (pull_request) Successful in 19m54s
2025-02-13 17:26:19 +01:00
8e4da4e16c
Merge pull request 'tests: fix website open port check' (#300) from tests-fix-website-port-check into main
Reviewed-on: #300
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-13 15:22:08 +00:00
835c7a8dde
Merge pull request 'mediawiki: set rememberme to avoid constant logout' (#299) from mediawiki-remember-password into main
Reviewed-on: #299
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-13 12:42:17 +00:00
c15bd0b180
Merge pull request 'nextcloud: add memories app + previews tuning' (#298) from nextcloud-memories into main
Reviewed-on: #298
2025-02-13 12:41:42 +00:00
a94290fb3a
tests: fix website open port check
All checks were successful
Flake checks / Check (pull_request) Successful in 17m35s
2025-02-11 18:57:28 +01:00
8707163324
nextcloud: add previewgenerator to extraApps
All checks were successful
Flake checks / Check (pull_request) Successful in 20m49s
2025-02-11 18:56:40 +01:00
cff2080d88
mediawiki: set rememberme to avoid constant logout
All checks were successful
Flake checks / Check (pull_request) Successful in 18m4s
2025-02-11 13:17:45 +01:00
fcbcbe755f
nextcloud(style): fix formatting
Some checks failed
Flake checks / Check (pull_request) Has been cancelled
2025-02-11 13:17:08 +01:00
db24ef998f
nextcloud: add memories app + previews tuning
Thanks to SuperSandro2000 for config snippets:
https://github.com/NuschtOS/nixos-modules/blob/main/modules/nextcloud.nix
2025-02-11 13:15:30 +01:00
aa93a22577
Merge pull request 'security: update forgejo and keycloak' (#296) from forgejo-security-update into main
Reviewed-on: #296
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-10 18:17:01 +00:00
727dc8a455
flake.lock: Update
All checks were successful
Flake checks / Check (pull_request) Successful in 23m29s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/18d0a984cc2bc82cf61df19523a34ad463aa7f54' (2025-01-29)
  → 'github:nix-community/disko/ff3568858c54bd306e9e1f2886f0f781df307dff' (2025-02-05)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/49b807fa7c37568d7fbe2aeaafb9255c185412f9' (2025-01-30)
  → 'github:lnl7/nix-darwin/0b6f96a6b9efcfa8d3cc8023008bcbcd1b9bc1a4' (2025-02-08)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/fecfeb86328381268e29e998ddd3ebc70bbd7f7c' (2025-02-03)
  → 'github:nixos/nixpkgs/a45fa362d887f4d4a7157d95c28ca9ce2899b70e' (2025-02-08)
2025-02-10 18:26:25 +01:00
e50f845bec
Merge pull request 'matrix-authentication-service: use 0.13.0 from nixos-unstable' (#294) from mas-unstable into main
Reviewed-on: #294
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-09 18:28:47 +00:00
f69fe224ec
Merge pull request 'backups/matrix: add DB dump for matrix-authentication-service' (#293) from mas-backups into main
Reviewed-on: #293
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-09 18:28:33 +00:00
fd111da14c
Merge pull request 'tankstelle: enable ksm kernel same-page merging' (#292) from tankstelle-enable-ksm into main
Reviewed-on: #292
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-09 18:09:25 +00:00
5c25ed45c4
Merge pull request 'element-web: enable Element Call by default' (#275) from element-call into main
Reviewed-on: #275
Reviewed-by: Akshay Mankar <axeman@noreply.git.pub.solar>
2025-02-09 18:09:14 +00:00
c03f0c5a2a
Merge pull request 'nextcloud: add recognize app' (#285) from nextcloud-recognize-app into main
Reviewed-on: #285
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-09 17:59:08 +00:00
da78d2ac23
Merge pull request 'docs/matrix-suspend-account.md: init' (#289) from docs into main
Reviewed-on: #289
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-09 17:58:17 +00:00
6b6e2d9f6e
matrix-authentication-service: use 0.13.0 from nixos-unstable
Some checks failed
Flake checks / Check (pull_request) Failing after 16m28s
2025-02-09 18:50:35 +01:00
665f8f76de
tankstelle: enable ksm kernel same-page merging
All checks were successful
Flake checks / Check (pull_request) Successful in 20m11s
for potentially lower memory usage
2025-02-07 11:19:46 -03:00
834982f909
backups/matrix: add DB dump of matrix-authentication-service
Some checks failed
Flake checks / Check (pull_request) Has been cancelled
2025-02-07 11:18:26 -03:00
1b8202271d
docs/matrix-suspend-account.md: init
All checks were successful
Flake checks / Check (pull_request) Successful in 19m28s
2025-02-07 11:05:54 -03:00
b950eb79d5
docs/deletion-request.md: update steps for mastodon 2025-02-07 11:05:54 -03:00
4c6911ea6f
overlays: remove unused inputs + rec,
All checks were successful
Flake checks / Check (pull_request) Successful in 14m18s
flake: remove unused master input
2025-02-07 11:03:39 -03:00
c6cbe941c4
nextcloud: add recognize app
based on PR: https://github.com/NixOS/nixpkgs/pull/333545
2025-02-07 11:03:38 -03:00
f0630d0467
Merge pull request 'matrix-authentication-service: early update to 0.13.0' (#291) from update-mas-0.13.0 into main
Reviewed-on: #291
Reviewed-by: Akshay Mankar <axeman@noreply.git.pub.solar>
2025-02-07 13:25:40 +00:00
82f42e8947
ci: use nix-fast-build to build checks
All checks were successful
Flake checks / Check (pull_request) Successful in 18m48s
ci: tests/keycloak: bump cores to 16, memory to 16384
2025-02-06 15:20:24 -03:00
f402be32d4
matrix-authentication-service: early update to 0.13.0
Some checks failed
Flake checks / Check (pull_request) Has been cancelled
https://github.com/NixOS/nixpkgs/pull/374272
2025-02-06 09:58:45 -03:00
bcb454833b
Merge pull request 'maintenance: update matrix-synapse, element-web, mediawiki, bind security update' (#290) from update-2025-02 into main
Reviewed-on: #290
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-04 17:12:19 +00:00
67c30deb39
flake.lock: Update
Some checks failed
Flake checks / Check (pull_request) Failing after 22m53s
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de' (2025-01-06)
  → 'github:hercules-ci/flake-parts/32ea77a06711b758da0ad9bd6a844c5740a87abd' (2025-02-01)
• Updated input 'flake-parts/nixpkgs-lib':
    'e9b5173191.tar.gz?narHash=sha256-CewEm1o2eVAnoqb6Ml%2BQi9Gg/EfNAxbRx1lANGVyoLI%3D' (2025-01-01)
  → '072a6db25e.tar.gz?narHash=sha256-vJzFZGaCpnmo7I6i416HaBLpC%2BhvcURh/BQwROcGIp8%3D' (2025-02-01)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/666e1b3f09c267afd66addebe80fb05a5ef2b554' (2025-01-30)
  → 'github:nixos/nixpkgs/fecfeb86328381268e29e998ddd3ebc70bbd7f7c' (2025-02-03)
• Updated input 'unstable':
    'github:nixos/nixpkgs/9d3ae807ebd2981d593cddd0080856873139aa40' (2025-01-29)
  → 'github:nixos/nixpkgs/c6e957d81b96751a3d5967a0fd73694f303cc914' (2025-02-03)
2025-02-04 09:09:21 -03:00
c15157ca8f
mediawiki: update to v1.42.4
Some checks failed
Flake checks / Check (pull_request) Failing after 33m2s
2025-02-01 16:52:42 -03:00
1fbdb9c939
flake.lock: Update
Some checks failed
Flake checks / Check (pull_request) Failing after 43m6s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/bf0abfde48f469c256f2b0f481c6281ff04a5db2' (2025-01-16)
  → 'github:nix-community/disko/18d0a984cc2bc82cf61df19523a34ad463aa7f54' (2025-01-29)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/62ba0a22426721c94e08f0779ed8235d5672869b' (2025-01-26)
  → 'github:lnl7/nix-darwin/49b807fa7c37568d7fbe2aeaafb9255c185412f9' (2025-01-30)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/4e96537f163fad24ed9eb317798a79afc85b51b7' (2025-01-26)
  → 'github:nixos/nixpkgs/666e1b3f09c267afd66addebe80fb05a5ef2b554' (2025-01-30)
• Updated input 'unstable':
    'github:nixos/nixpkgs/852ff1d9e153d8875a83602e03fdef8a63f0ecf8' (2025-01-26)
  → 'github:nixos/nixpkgs/9d3ae807ebd2981d593cddd0080856873139aa40' (2025-01-29)
2025-02-01 16:28:28 -03:00
6c0d41024e
Merge pull request 'keycloak/delete-unverified-accounts.md: Delete temp files in the end' (#288) from keycloak-temp-file-del into main
Reviewed-on: #288
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
2025-02-01 12:56:58 +00:00
253eb7ce4a
Merge pull request 'update to NixOS 24.11' (#278) from nixos-24.11 into main
Reviewed-on: #278
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
Reviewed-by: Akshay Mankar <axeman@noreply.git.pub.solar>
Reviewed-by: hensoko <hensoko@noreply.git.pub.solar>
2025-02-01 00:22:25 +00:00
6e303fabb8
keycloak/delete-unverified-accounts.md: Delete temp files in the end
All checks were successful
Flake checks / Check (pull_request) Successful in 44m7s
2025-01-31 16:41:19 +01:00
c3e61363aa
flake: update to NixOS 24.11
Some checks failed
Flake checks / Check (pull_request) Failing after 39m21s
- fixed our keycloak theme with keycloak 26.1.0 in pub-solar/keycloak-theme#5

- fixed broken NixOS matrix-appservice-irc module in https://github.com/NixOS/nixpkgs/pull/375533

Fix warnings:
trace: evaluation warning: The option `services.forgejo.mailerPasswordFile' defined in `/nix/store/13vqhb5askjgi07wqwxawq4bdm7h0wc7-source/flake.nix, via option flake.nixosModules.forgejo' has been renamed to `services.forgejo.secrets.mailer.PASSWD'.
trace: evaluation warning: Using `services.nextcloud.config.dbtableprefix` is deprecated. Fresh installations with this option set are not allowed anymore since v20. If you have an existing installation with a custom table prefix, make sure it is set correctly in `config.php` and remove the option from your NixOS config.

Fix errors:
- The option definition `services.matrix-sliding-sync' in `/nix/store/wgxgv8rjbd2nhf7y28kfzm4n6kz85dnq-source/flake.nix, via option flake.nixosModules.matrix' no longer has any effect; please remove it.
The matrix-sliding-sync package has been removed, since matrix-synapse incorporated its functionality

- The option `services.keycloak.settings.proxy' has been removed. Set `services.keycloak.settings.proxy-headers` in combination with other hostname options as needed instead.
See [Proxy option removed](https://www.keycloak.org/docs/latest/upgrading/index.html#proxy-option-removed) for more information.

error: The option `services.matrix-appservice-irc.settings.ircService.mediaProxy.publicUrl' was accessed but has no value defined. Try setting the option.
2025-01-27 18:13:30 -03:00
64c2a41fc5
Merge pull request 'admins: add host biolimo for @b12f' (#287) from b12f/biolimo into main
Reviewed-on: #287
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
2025-01-06 17:46:40 +00:00
fcd48af91b
admins: add host biolimo for @b12f
All checks were successful
Flake checks / Check (pull_request) Successful in 27m6s
2024-12-27 00:25:09 +01:00
0475cfdd6a
Merge pull request 'tests/keycloak: try to reduce flakyness' (#284) from fix-keycloak-test into main
Reviewed-on: #284
Reviewed-by: Akshay Mankar <axeman@noreply.git.pub.solar>
2024-12-18 19:28:38 +00:00
23b81b310a
tests: try to reduce flakyness
All checks were successful
Flake checks / Check (pull_request) Successful in 41m3s
2024-12-18 11:47:12 -03:00
475af2f82f
Merge pull request 'maintenance: update forgejo, matrix-synapse, nextcloud and linux kernel' (#283) from maintenance-updates into main
Reviewed-on: #283
2024-12-17 20:48:23 +00:00
197ba721fe
flake.lock: Update
Some checks failed
Flake checks / Check (pull_request) Has been cancelled
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5' (2024-12-02)
  → 'github:nix-community/disko/a08bfe06b39e94eec98dd089a2c1b18af01fef19' (2024-12-16)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/7109b680d161993918b0a126f38bc39763e5a709' (2024-12-09)
  → 'github:nixos/nixpkgs/bcba2fbf6963bf6bed3a749f9f4cf5bff4adb96d' (2024-12-14)
• Updated input 'unstable':
    'github:nixos/nixpkgs/a73246e2eef4c6ed172979932bc80e1404ba2d56' (2024-12-09)
  → 'github:nixos/nixpkgs/3566ab7246670a43abd2ffa913cc62dad9cdf7d5' (2024-12-13)
2024-12-16 19:01:08 +01:00
642b35fb06
Merge pull request 'logins: add chocolatebar for b12f' (#282) from b12f/wg-chocolatebar into main
Reviewed-on: #282
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
2024-12-12 16:42:31 +00:00
d5bbe3d0f5
logins: add chocolatebar for b12f
All checks were successful
Flake checks / Check (pull_request) Successful in 31m51s
2024-12-12 16:41:50 +00:00
161ec7a7d1
Merge pull request 'update element-web' (#281) from update-element into main
Reviewed-on: #281
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
2024-12-10 11:13:20 +00:00
4e1678b1d1
Merge pull request 'bash: ignore leading space + duplicates in history' (#280) from bash-ignore-space into main
Reviewed-on: #280
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
2024-12-10 11:07:55 +00:00
6acc3f7927
flake.lock: Update
All checks were successful
Flake checks / Check (pull_request) Successful in 31m43s
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/190c31a89e5eec80dd6604d7f9e5af3802a58a13' (2024-12-05)
  → 'github:nixos/nixpkgs/7109b680d161993918b0a126f38bc39763e5a709' (2024-12-09)
• Updated input 'unstable':
    'github:nixos/nixpkgs/22c3f2cf41a0e70184334a958e6b124fb0ce3e01' (2024-12-07)
  → 'github:nixos/nixpkgs/a73246e2eef4c6ed172979932bc80e1404ba2d56' (2024-12-09)
2024-12-10 11:33:17 +01:00
386f2b2ba5
bash: ignore leading space + duplicates in history
All checks were successful
Flake checks / Check (pull_request) Successful in 28m23s
2024-12-09 18:49:58 +01:00
6645e10afa
Merge pull request 'security update for synapse, updates for element-web, mastodon' (#279) from security-updates into main
Reviewed-on: #279
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
2024-12-08 20:08:08 +00:00
eef268b21b
style: fix formatting
All checks were successful
Flake checks / Check (pull_request) Successful in 41m25s
2024-12-08 18:59:27 +01:00
5192f382bc
flake.lock: Update
Some checks failed
Flake checks / Check (pull_request) Failing after 27s
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/639d1520df9417ca2761536c3072688569e83c80' (2024-11-18)
  → 'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5' (2024-12-02)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90' (2024-11-01)
  → 'github:hercules-ci/flake-parts/205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9' (2024-12-04)
• Updated input 'flake-parts/nixpkgs-lib':
    'cc2f280002.tar.gz?narHash=sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s%3D' (2024-11-01)
  → '5487e69da4.tar.gz?narHash=sha256-1qRH7uAUsyQI7R1Uwl4T%2BXvdNv778H0Nb5njNrqvylY%3D' (2024-12-01)
• Updated input 'maunium-stickerpicker':
    'github:maunium/stickerpicker/333567f481e60443360aa7199d481e1a45b3a523?dir=web' (2024-06-19)
  → 'github:maunium/stickerpicker/89d3aece041c85ebe5a1ad4e620388af5227cbb0?dir=web' (2024-12-02)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/61cee20168a3ebb71a9efd70a55adebaadfbe4d4' (2024-11-19)
  → 'github:lnl7/nix-darwin/a35b08d09efda83625bef267eb24347b446c80b8' (2024-12-07)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/e8c38b73aeb218e27163376a2d617e61a2ad9b59' (2024-11-16)
  → 'github:nixos/nixpkgs/190c31a89e5eec80dd6604d7f9e5af3802a58a13' (2024-12-05)
• Updated input 'unstable':
    'github:nixos/nixpkgs/5e4fbfb6b3de1aa2872b76d49fafc942626e2add' (2024-11-15)
  → 'github:nixos/nixpkgs/22c3f2cf41a0e70184334a958e6b124fb0ce3e01' (2024-12-07)
2024-12-08 18:29:10 +01:00
3e32bfe106
Merge pull request 'auth: add user for each administrator' (#261) from per-admin-user into main
Reviewed-on: #261
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
Reviewed-by: Akshay Mankar <axeman@noreply.git.pub.solar>
2024-11-28 16:16:35 +00:00
aee317b463
flake: format
Some checks failed
Flake checks / Check (pull_request) Failing after 46m45s
2024-11-26 17:58:30 +01:00
98b546f587
docs: update for per admin user SSH access 2024-11-26 17:58:26 +01:00
42b3052091
deploy: remove hard-coded SSH user barkeeper 2024-11-26 17:56:15 +01:00
b4cfdd1c48
element-web: enable Element Call by default
All checks were successful
Flake checks / Check (pull_request) Successful in 24m3s
2024-11-21 11:15:09 +01:00
6a0b9e7e88
Merge pull request 'matrix: Enable MSC4108 to allow signing in with QR Code' (#274) from matrix-rendezvous-server-attempt-2 into main
Reviewed-on: #274
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
2024-11-21 09:44:58 +00:00
90c8072f92
matrix: remove long-gone dimension from well-known
All checks were successful
Flake checks / Check (pull_request) Successful in 24m49s
2024-11-21 09:15:10 +01:00
5076266842
matrix: Enable MSC4108 to allow Signing in with QR Code
Enable MSC3266 room summary API to enable room previews

Co-authored-by: teutat3s <teutates@mailbox.org>
2024-11-21 09:14:17 +01:00
eb63779bb6
auth: use all sshPubKeys for disk unlock, fix tests, fix hm config
All checks were successful
Flake checks / Check (pull_request) Successful in 28m11s
2024-11-20 16:49:39 +01:00
acc537decd
hosts: use correct wireguardDevices option 2024-11-20 16:49:39 +01:00
2b72d9a5a8
style: run nix fmt 2024-11-20 16:49:39 +01:00
5366d07d44
auth: add user for each administrator
After this has been tested successfully, root SSH login can be disabled.

The advantages of having a user for each adminstrator:

* Better security analysis: who issued executed what command, who
  touched which file, who used sudo at which time.
* Possibility of granular access, e.g. person X is only allowed to
  manage service Y
2024-11-20 16:49:38 +01:00
49 changed files with 716 additions and 552 deletions

View file

@ -18,20 +18,7 @@ jobs:
# Prevent cache garbage collection by creating GC roots # Prevent cache garbage collection by creating GC roots
mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results
for target in $(nix flake show --json --all-systems | jq --raw-output ' sed -i 's/virtualisation.cores .*/virtualisation.cores = 16;/' tests/keycloak.nix
.["nixosConfigurations"] | sed -i 's/virtualisation.memorySize .*/virtualisation.memorySize = 16384;/' tests/keycloak.nix
to_entries[] | # 1 eval-worker needs about 13GB of memory
.key' nix --accept-flake-config --access-tokens '' develop --command nix-fast-build --no-nom --skip-cached --systems "x86_64-linux" --max-jobs 10 --eval-workers 2 --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/nix-fast-build
); do
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
done
for check in $(nix flake show --json --all-systems | jq --raw-output '
.checks."x86_64-linux" |
to_entries[] |
.key'
); do
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$check" ".#checks.x86_64-linux.${check}"
done

View file

@ -28,18 +28,18 @@ People with admin access to the infrastructure are added to [`logins/admins.nix`
SSH is not reachable from the open internet. Instead, SSH Port 22 is protected by a wireguard VPN network. Thus, to get root access on the servers, at least two pieces of information have to be added to the admins config: SSH is not reachable from the open internet. Instead, SSH Port 22 is protected by a wireguard VPN network. Thus, to get root access on the servers, at least two pieces of information have to be added to the admins config:
1. **SSH Public key**: self-explanatory. Add your public key to your user attrset under `sshPubKeys`. 1. **SSH Public key**: self-explanatory. Add your public key to your user attrset under `sshPubKeys`.
2. **Wireguard device**: each wireguard device has two parts: the public key and the IP addresses it should have in the wireguard network. The pub.solar wireguard network is spaced under `10.7.6.0/24` and `fd00:fae:fae:fae:fae::/80`. To add your device, it's best to choose a free number between 200 and 255 and use that in both the ipv4 and ipv6 ranges: `10.7.6.<ip-address>/32` `fd00:fae:fae:fae:fae:<ip-address>::/96`. For more information on how to generate keypairs, see [the NixOS Wireguard docs](https://nixos.wiki/wiki/WireGuard#Generate_keypair). 2. **Wireguard device**: each wireguard device has two parts: the public key and the IP addresses it should have in the wireguard network. The pub.solar wireguard network uses the subnets `10.7.6.0/24` and `fd00:fae:fae:fae:fae::/80`. To add your device, it's best to choose a free number between 200 and 255 and use that in both the ipv4 and ipv6 ranges: `10.7.6.<ip-address>/32` `fd00:fae:fae:fae:fae:<ip-address>::/96`. For more information on how to generate keypairs, see [the NixOS Wireguard docs](https://nixos.wiki/wiki/WireGuard#Generate_keypair).
One can access our hosts using this domain scheme: One can access our hosts using this domain scheme:
``` ```
ssh barkeeper@<hostname>.wg.pub.solar ssh <unix-username>@<hostname>.wg.pub.solar
``` ```
So, for example for `nachtigall`: So, for example for `nachtigall`:
``` ```
ssh barkeeper@nachtigall.wg.pub.solar ssh teutat3s@nachtigall.wg.pub.solar
``` ```
Example NixOS snippet for WireGuard client config Example NixOS snippet for WireGuard client config

View file

@ -34,7 +34,13 @@ Docs: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server
### Mastodon ### Mastodon
``` ```
mkdir /tmp/tootctl
sudo chown mastodon /tmp/tootctl
cd /tmp/tootctl
sudo -u mastodon mastodon-tootctl accounts delete --email <mail-address> sudo -u mastodon mastodon-tootctl accounts delete --email <mail-address>
rm -r /tmp/tootctl
``` ```
Docs: https://docs.joinmastodon.org/admin/tootctl/#accounts-delete Docs: https://docs.joinmastodon.org/admin/tootctl/#accounts-delete

View file

@ -7,16 +7,29 @@ be manually deployed.
To deploy, make sure you have a [working development shell](./development-shell.md). To deploy, make sure you have a [working development shell](./development-shell.md).
Then, run `deploy-rs` with the hostname of the server you want to deploy: Then, run `deploy-rs` with the hostname of the server you want to deploy:
### Dry-run
Use `--dry-activate` to show a diff of updated packages and all services that
would be restarted by the update. This will also put all files in place without
switching to the new generation, enabling a quick switch to the new config at a
later moment.
For nachtigall.pub.solar: For nachtigall.pub.solar:
``` ```
deploy --targets '.#nachtigall' --magic-rollback false --auto-rollback false --keep-result --result-path ./results deploy --targets '.#nachtigall' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results --dry-activate
```
After reviewing the changes, apply the update with:
```
deploy --targets '.#nachtigall' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results
``` ```
For metronom.pub.solar (aarch64-linux): For metronom.pub.solar (aarch64-linux):
``` ```
deploy --targets '.#metronom' --magic-rollback false --auto-rollback false --keep-result --result-path ./results --remote-build deploy --targets '.#metronom' --ssh-user <unix-username> --magic-rollback false --auto-rollback false --keep-result --result-path ./results --remote-build
``` ```
Usually we skip all rollback functionality, but if you want to deploy a change Usually we skip all rollback functionality, but if you want to deploy a change
@ -25,9 +38,6 @@ that might lock you out, e.g. to SSH, it might make sense to set these to `true`
To skip flake checks, e.g. because you already ran them manually before To skip flake checks, e.g. because you already ran them manually before
deployment, add the flag `--skip-checks` at the end of the command. deployment, add the flag `--skip-checks` at the end of the command.
`--dry-activate` can be used to only put all files in place without switching,
to enable switching to the new config quickly at a later moment.
We use `--keep-result --result-path ./results` to keep the last `result` We use `--keep-result --result-path ./results` to keep the last `result`
symlink of each `deploy` from being garbage collected. That way, we keep builds symlink of each `deploy` from being garbage collected. That way, we keep builds
cached in the Nix store. This is optional and both flags can be removed if disk cached in the Nix store. This is optional and both flags can be removed if disk

View file

@ -8,7 +8,7 @@ Requirements:
- [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell` - [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell`
``` ```
ssh barkeeper@trinkgenossin.wg.pub.solar ssh <unix-username>@trinkgenossin.wg.pub.solar
``` ```
``` ```
@ -58,7 +58,7 @@ Further reading:
### Notes on manual setup steps ### Notes on manual setup steps
``` ```
ssh barkeeper@trinkgenossin.wg.pub.solar ssh <unix-username>@trinkgenossin.wg.pub.solar
# Add a few spaces to avoid leaking the secret to the shell history # Add a few spaces to avoid leaking the secret to the shell history
export GARAGE_RPC_SECRET=<secret-in-keepass> export GARAGE_RPC_SECRET=<secret-in-keepass>

View file

@ -12,7 +12,7 @@ Run following after SSH'ing to `nachtigall`.
Credentials for the following command are in keepass. Create a keycloak Credentials for the following command are in keepass. Create a keycloak
config/credentials file at `/tmp/kcadm.config`: config/credentials file at `/tmp/kcadm.config`:
``` ```bash
sudo --user keycloak kcadm.sh config credentials \ sudo --user keycloak kcadm.sh config credentials \
--config /tmp/kcadm.config \ --config /tmp/kcadm.config \
--server https://auth.pub.solar \ --server https://auth.pub.solar \
@ -22,7 +22,7 @@ sudo --user keycloak kcadm.sh config credentials \
Get list of accounts without a verified email address: Get list of accounts without a verified email address:
``` ```bash
sudo --user keycloak kcadm.sh get \ sudo --user keycloak kcadm.sh get \
--config /tmp/kcadm.config \ --config /tmp/kcadm.config \
users \ users \
@ -35,7 +35,7 @@ Review list of accounts, especially check `createdTimestamp` if any accounts
were created in the past 2 days. If so, delete those from the were created in the past 2 days. If so, delete those from the
`/tmp/keycloak-unverified-accounts` file. `/tmp/keycloak-unverified-accounts` file.
``` ```bash
createdTimestamps=( $( nix run nixpkgs#jq -- -r '.[].createdTimestamp' < /tmp/keycloak-unverified-accounts ) ) createdTimestamps=( $( nix run nixpkgs#jq -- -r '.[].createdTimestamp' < /tmp/keycloak-unverified-accounts ) )
# timestamps are in nanoseconds since epoch, so we need to strip the last three digits # timestamps are in nanoseconds since epoch, so we need to strip the last three digits
@ -46,17 +46,17 @@ vim /tmp/keycloak-unverified-accounts
Check how many accounts are going to be deleted: Check how many accounts are going to be deleted:
``` ```bash
jq -r '.[].id' < /tmp/keycloak-unverified-accounts | wc -l jq -r '.[].id' < /tmp/keycloak-unverified-accounts | wc -l
``` ```
``` ```bash
jq -r '.[].id' < /tmp/keycloak-unverified-accounts > /tmp/keycloak-unverified-account-ids jq -r '.[].id' < /tmp/keycloak-unverified-accounts > /tmp/keycloak-unverified-account-ids
``` ```
Final check before deletion (dry-run): Final check before deletion (dry-run):
``` ```bash
for id in $(cat /tmp/keycloak-unverified-account-ids) for id in $(cat /tmp/keycloak-unverified-account-ids)
do do
echo sudo --user keycloak kcadm.sh delete \ echo sudo --user keycloak kcadm.sh delete \
@ -68,7 +68,7 @@ for id in $(cat /tmp/keycloak-unverified-account-ids)
THIS WILL DELETE ACCOUNTS: THIS WILL DELETE ACCOUNTS:
``` ```bash
for id in $(cat /tmp/keycloak-unverified-account-ids) for id in $(cat /tmp/keycloak-unverified-account-ids)
do do
sudo --user keycloak kcadm.sh delete \ sudo --user keycloak kcadm.sh delete \
@ -77,3 +77,9 @@ for id in $(cat /tmp/keycloak-unverified-account-ids)
--realm pub.solar --realm pub.solar
done done
``` ```
Delete the temp files:
```bash
sudo rm /tmp/kcadm.config /tmp/keycloak-unverified-accounts /tmp/keycloak-unverified-account-ids
```

View file

@ -0,0 +1,27 @@
# Matrix account suspension
> Unlike [account locking](https://spec.matrix.org/v1.12/client-server-api/#account-locking),
> [suspension](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3823-code-for-account-suspension.md)
> allows the user to have a (largely) readonly view of their account.
> Homeserver administrators and moderators may use this functionality to
> temporarily deactivate an account, or place conditions on the account's
> experience. Critically, like locking, account suspension is reversible, unlike
> the deactivation mechanism currently available in Matrix - a destructive,
> irreversible, action.
Required:
- `matrix-synapse admin token`
- [SSH access to host `nachtigall`](./administrative-access.md#ssh-access)
## Suspending an account
```bash
curl --header "Authorization: Bearer <admin-access-token>" --request PUT http://127.0.0.1:8008/_synapse/admin/v1/suspend/@<username>:pub.solar --data '{"suspend": true}'
```
## Unsuspending an account
```bash
curl --header "Authorization: Bearer <admin-access-token>" --request PUT http://127.0.0.1:8008/_synapse/admin/v1/suspend/@<username>:pub.solar --data '{"suspend": false}'
```

View file

@ -41,3 +41,7 @@ wrapped-ruby-mastodon-gems: 4.2.1 → 4.2.3
zfs-kernel: 2.2.1-6.1.64 → 2.2.2-6.1.66 zfs-kernel: 2.2.1-6.1.64 → 2.2.2-6.1.66
zfs-user: 2.2.1 → 2.2.2 zfs-user: 2.2.1 → 2.2.2
``` ```
### Deploying updates
See [deploying.md](./deploying.md).

122
flake.lock generated
View file

@ -14,11 +14,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1723293904, "lastModified": 1736955230,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -94,11 +94,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731895210, "lastModified": 1738765162,
"narHash": "sha256-z76Q/OXLxO/RxMII3fIt/TG665DANiE2lVvnolK2lXk=", "narHash": "sha256-3Z40qHaFScWUCVQrGc4Y+RdoPsh1R/wIh+AN4cTXP0I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "639d1520df9417ca2761536c3072688569e83c80", "rev": "ff3568858c54bd306e9e1f2886f0f781df307dff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -185,11 +185,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1730504689, "lastModified": 1738453229,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90", "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -236,16 +236,16 @@
}, },
"fork": { "fork": {
"locked": { "locked": {
"lastModified": 1729963002, "lastModified": 1738846146,
"narHash": "sha256-2zrYfd/qdfExU5zVwvH80uJnKc/dMeK6zp3O1UtW2Mo=", "narHash": "sha256-cIPiBEspPXQxju2AUZK9kjh6oqea+HkPFqmGv7yUztM=",
"owner": "teutat3s", "owner": "teutat3s",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "005faaacbeede0296dec5c844f508027ab8a3ff6", "rev": "e370f40b129e47b08562524ab4f053a172a94273",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "teutat3s", "owner": "teutat3s",
"ref": "init-matrix-authentication-service-module", "ref": "init-matrix-authentication-service-module-0.13.0",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -257,16 +257,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1736373539,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -280,11 +280,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731518114, "lastModified": 1738012343,
"narHash": "sha256-h9Wb3VjmXBZwTO3prRweUKwp2H9hZHCQKrkbU+2WPQs=", "narHash": "sha256-agMgWwVxXII+RtCqok8ROjzpKJung/5N5f2BVDmMC5Q=",
"ref": "main", "ref": "main",
"rev": "060ecccc5f8c92a0705ab91ff047811efd559468", "rev": "4ffd7bc8ea032991756c5e8e8a37b039789045bc",
"revCount": 36, "revCount": 38,
"type": "git", "type": "git",
"url": "https://git.pub.solar/pub-solar/keycloak-theme" "url": "https://git.pub.solar/pub-solar/keycloak-theme"
}, },
@ -298,11 +298,11 @@
"flake": false, "flake": false,
"locked": { "locked": {
"dir": "web", "dir": "web",
"lastModified": 1718796561, "lastModified": 1733177811,
"narHash": "sha256-RKAAHve17lrJokgAPkM2k/E+f9djencwwg3Xcd70Yfw=", "narHash": "sha256-1n7bPSCRw7keTCIu4tJGnUlkoId6H1+dPsTPzKo3Rrk=",
"owner": "maunium", "owner": "maunium",
"repo": "stickerpicker", "repo": "stickerpicker",
"rev": "333567f481e60443360aa7199d481e1a45b3a523", "rev": "89d3aece041c85ebe5a1ad4e620388af5227cbb0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -320,11 +320,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732016537, "lastModified": 1739034224,
"narHash": "sha256-XwXUK+meYnlhdQz2TVE4Wv+tsx1CkdGbDPt1tRzCNH4=", "narHash": "sha256-Mj/8jDzh1KNmUhWqEeVlW3hO9MZkxqioJGnmR7rivaE=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "61cee20168a3ebb71a9efd70a55adebaadfbe4d4", "rev": "0b6f96a6b9efcfa8d3cc8023008bcbcd1b9bc1a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -336,30 +336,30 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1731797254, "lastModified": 1739055578,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", "narHash": "sha256-2MhC2Bgd06uI1A0vkdNUyDYsMD0SLNGKtD8600mZ69A=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", "rev": "a45fa362d887f4d4a7157d95c28ca9ce2899b70e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1730504152, "lastModified": 1738452942,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=", "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
} }
}, },
"root": { "root": {
@ -387,22 +387,21 @@
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
], ],
"nixpkgs-24_05": [ "nixpkgs-24_11": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1718084203, "lastModified": 1734884447,
"narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=", "narHash": "sha256-HA9fAmGNGf0cOYrhgoa+B6BxNVqGAYXfLyx8zIS0ZBY=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "29916981e7b3b5782dc5085ad18490113f8ff63b", "rev": "63209b1def2c9fc891ad271f474a3464a5833294",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"type": "gitlab" "type": "gitlab"
} }
@ -467,28 +466,13 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1731676054, "lastModified": 1739020877,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -515,24 +499,6 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "type": "github"
} }
},
"utils_2": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,14 +1,14 @@
{ {
inputs = { inputs = {
# Track channels with commits tested and built by hydra # Track channels with commits tested and built by hydra
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable";
fork.url = "github:teutat3s/nixpkgs/init-matrix-authentication-service-module"; fork.url = "github:teutat3s/nixpkgs/init-matrix-authentication-service-module-0.13.0";
nix-darwin.url = "github:lnl7/nix-darwin/master"; nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
@ -37,8 +37,8 @@
element-stickers.inputs.maunium-stickerpicker.follows = "maunium-stickerpicker"; element-stickers.inputs.maunium-stickerpicker.follows = "maunium-stickerpicker";
element-stickers.inputs.nixpkgs.follows = "nixpkgs"; element-stickers.inputs.nixpkgs.follows = "nixpkgs";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11";
simple-nixos-mailserver.inputs.nixpkgs-24_05.follows = "nixpkgs"; simple-nixos-mailserver.inputs.nixpkgs-24_11.follows = "nixpkgs";
simple-nixos-mailserver.inputs.nixpkgs.follows = "unstable"; simple-nixos-mailserver.inputs.nixpkgs.follows = "unstable";
}; };
@ -73,11 +73,28 @@
overlays = [ inputs.agenix.overlays.default ]; overlays = [ inputs.agenix.overlays.default ];
}; };
unstable = import inputs.unstable { inherit system; }; unstable = import inputs.unstable { inherit system; };
master = import inputs.master { inherit system; };
}; };
checks = checks =
let let
machinesPerSystem = {
aarch64-linux = [
"metronom"
];
x86_64-linux = [
"blue-shell"
"delite"
"nachtigall"
"tankstelle"
"trinkgenossin"
"underground"
];
};
nixosMachines = inputs.nixpkgs.lib.mapAttrs' (n: inputs.nixpkgs.lib.nameValuePair "nixos-${n}") (
inputs.nixpkgs.lib.genAttrs (machinesPerSystem.${system} or [ ]) (
name: self.nixosConfigurations.${name}.config.system.build.toplevel
)
);
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { }; nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
testDir = builtins.attrNames (builtins.readDir ./tests); testDir = builtins.attrNames (builtins.readDir ./tests);
testFiles = builtins.filter (n: builtins.match "^.*.nix$" n != null) testDir; testFiles = builtins.filter (n: builtins.match "^.*.nix$" n != null) testDir;
@ -94,12 +111,13 @@
} }
); );
}) testFiles }) testFiles
); )
// nixosMachines;
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
deploy-rs deploy-rs
nixpkgs-fmt nix-fast-build
agenix agenix
age-plugin-yubikey age-plugin-yubikey
cachix cachix
@ -108,9 +126,9 @@
nvfetcher nvfetcher
shellcheck shellcheck
shfmt shfmt
inputs.unstable.legacyPackages.${system}.treefmt2 treefmt2
nixos-generators nixos-generators
inputs.unstable.legacyPackages.${system}.opentofu opentofu
terraform-backend-git terraform-backend-git
terraform-ls terraform-ls
jq jq
@ -120,13 +138,7 @@
devShells.ci = pkgs.mkShell { buildInputs = with pkgs; [ nodejs ]; }; devShells.ci = pkgs.mkShell { buildInputs = with pkgs; [ nodejs ]; };
}; };
flake = flake = {
let
username = "barkeeper";
in
{
inherit username;
nixosModules = builtins.listToAttrs ( nixosModules = builtins.listToAttrs (
map (x: { map (x: {
name = x; name = x;
@ -138,36 +150,29 @@
system: deployLib: deployLib.deployChecks self.deploy system: deployLib: deployLib.deployChecks self.deploy
) inputs.deploy-rs.lib; ) inputs.deploy-rs.lib;
formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style; formatter."x86_64-linux" = inputs.nixpkgs.legacyPackages."x86_64-linux".nixfmt-rfc-style;
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations { deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
nachtigall = { nachtigall = {
hostname = "nachtigall.wg.pub.solar"; hostname = "nachtigall.wg.pub.solar";
sshUser = username;
}; };
metronom = { metronom = {
hostname = "metronom.wg.pub.solar"; hostname = "metronom.wg.pub.solar";
sshUser = username;
}; };
tankstelle = { tankstelle = {
hostname = "tankstelle.wg.pub.solar"; hostname = "tankstelle.wg.pub.solar";
sshUser = username;
}; };
underground = { underground = {
hostname = "80.244.242.3"; hostname = "80.244.242.3";
sshUser = username;
}; };
trinkgenossin = { trinkgenossin = {
hostname = "trinkgenossin.wg.pub.solar"; hostname = "trinkgenossin.wg.pub.solar";
sshUser = username;
}; };
delite = { delite = {
hostname = "delite.wg.pub.solar"; hostname = "delite.wg.pub.solar";
sshUser = username;
}; };
blue-shell = { blue-shell = {
hostname = "blue-shell.wg.pub.solar"; hostname = "blue-shell.wg.pub.solar";
sshUser = username;
}; };
}; };
}; };

View file

@ -22,7 +22,7 @@ in
"${wireguardIPv6}/96" "${wireguardIPv6}/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# trinkgenossin.pub.solar # trinkgenossin.pub.solar
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4="; publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";

View file

@ -22,7 +22,7 @@ in
"${wireguardIPv6}/96" "${wireguardIPv6}/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# trinkgenossin.pub.solar # trinkgenossin.pub.solar
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4="; publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";

View file

@ -18,7 +18,7 @@
"fd00:fae:fae:fae:fae:3::/96" "fd00:fae:fae:fae:fae:3::/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# nachtigall.pub.solar # nachtigall.pub.solar
endpoint = "138.201.80.102:51820"; endpoint = "138.201.80.102:51820";

View file

@ -73,22 +73,24 @@
owner = "matrix-synapse"; owner = "matrix-synapse";
}; };
age.secrets."matrix-synapse-sliding-sync-secret" = {
file = "${flake.self}/secrets/matrix-synapse-sliding-sync-secret.age";
mode = "400";
owner = "matrix-synapse";
};
age.secrets."matrix-authentication-service-secret-config.yml" = { age.secrets."matrix-authentication-service-secret-config.yml" = {
file = "${flake.self}/secrets/matrix-authentication-service-secret-config.yml.age"; file = "${flake.self}/secrets/matrix-authentication-service-secret-config.yml.age";
mode = "400"; mode = "400";
owner = "matrix-authentication-service"; owner = "matrix-authentication-service";
}; };
# matrix-appservice-irc
age.secrets."matrix-appservice-irc-mediaproxy-signing-key" = {
file = "${flake.self}/secrets/matrix-appservice-irc-mediaproxy-signing-key.jwk.age";
mode = "400";
owner = "matrix-appservice-irc";
};
pub-solar-os.matrix = { pub-solar-os.matrix = {
enable = true; enable = true;
appservice-irc.mediaproxy.signingKeyPath =
config.age.secrets."matrix-appservice-irc-mediaproxy-signing-key".path;
synapse = { synapse = {
sliding-sync.enable = false;
signing_key_path = config.age.secrets."matrix-synapse-signing-key".path; signing_key_path = config.age.secrets."matrix-synapse-signing-key".path;
extra-config-files = [ extra-config-files = [
config.age.secrets."matrix-synapse-secret-config.yaml".path config.age.secrets."matrix-synapse-secret-config.yaml".path

View file

@ -9,12 +9,10 @@
./networking.nix ./networking.nix
./wireguard.nix ./wireguard.nix
./backups.nix ./backups.nix
"${flake.inputs.fork}/nixos/modules/services//matrix/matrix-authentication-service.nix" "${flake.inputs.fork}/nixos/modules/services/matrix/matrix-authentication-service.nix"
"${flake.inputs.unstable}/nixos/modules/services/web-apps/mastodon.nix"
]; ];
disabledModules = [ disabledModules = [
"services/matrix/matrix-authentication-service.nix" "services/matrix/matrix-authentication-service.nix"
"services/web-apps/mastodon.nix"
]; ];
} }

View file

@ -18,7 +18,7 @@
"fd00:fae:fae:fae:fae:1::/96" "fd00:fae:fae:fae:fae:1::/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# tankstelle.pub.solar # tankstelle.pub.solar
endpoint = "80.244.242.5:51820"; endpoint = "80.244.242.5:51820";

View file

@ -10,6 +10,9 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# kernel same-page merging
hardware.ksm.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -18,7 +18,7 @@
"fd00:fae:fae:fae:fae:4::/96" "fd00:fae:fae:fae:fae:4::/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# nachtigall.pub.solar # nachtigall.pub.solar
endpoint = "138.201.80.102:51820"; endpoint = "138.201.80.102:51820";

View file

@ -22,7 +22,7 @@ in
"${wireguardIPv6}/96" "${wireguardIPv6}/96"
]; ];
privateKeyFile = config.age.secrets.wg-private-key.path; privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [ peers = flake.self.logins.wireguardDevices ++ [
{ {
# nachtigall.pub.solar # nachtigall.pub.solar
endpoint = "138.201.80.102:51820"; endpoint = "138.201.80.102:51820";

View file

@ -42,8 +42,17 @@
owner = "matrix-authentication-service"; owner = "matrix-authentication-service";
}; };
# matrix-appservice-irc
age.secrets."matrix-appservice-irc-mediaproxy-signing-key" = {
file = "${flake.self}/secrets/staging-matrix-appservice-irc-mediaproxy-signing-key.jwk.age";
mode = "400";
owner = "matrix-appservice-irc";
};
pub-solar-os.matrix = { pub-solar-os.matrix = {
enable = true; enable = true;
appservice-irc.mediaproxy.signingKeyPath =
config.age.secrets."matrix-appservice-irc-mediaproxy-signing-key".path;
synapse = { synapse = {
extra-config-files = [ extra-config-files = [
config.age.secrets."staging-matrix-synapse-secret-config.yaml".path config.age.secrets."staging-matrix-synapse-secret-config.yaml".path

View file

@ -7,7 +7,7 @@
./configuration.nix ./configuration.nix
./networking.nix ./networking.nix
"${flake.inputs.fork}/nixos/modules/services//matrix/matrix-authentication-service.nix" "${flake.inputs.fork}/nixos/modules/services/matrix/matrix-authentication-service.nix"
]; ];
disabledModules = [ disabledModules = [

View file

@ -38,6 +38,22 @@
"fd00:fae:fae:fae:fae:200::/96" "fd00:fae:fae:fae:fae:200::/96"
]; ];
} }
{
# chocolatebar
publicKey = "AS9w0zDUFLcH6IiF6T1vsyZPWPJ3p5fKsjIsM2AoZz8=";
allowedIPs = [
"10.7.6.205/32"
"fd00:fae:fae:fae:fae:205::/96"
];
}
{
# biolimo
publicKey = "gnLq6KikFVVGxLxPW+3ZnreokEKLDoso+cUepPOZsBA=";
allowedIPs = [
"10.7.6.206/32"
"fd00:fae:fae:fae:fae:206::/96"
];
}
]; ];
}; };

View file

@ -6,19 +6,16 @@ in
{ {
flake = { flake = {
logins = { logins = {
admins = admins = admins;
lib.lists.foldl wireguardDevices = lib.lists.foldl (
(logins: adminConfig: { wireguardDevices: adminConfig:
sshPubKeys = logins.sshPubKeys ++ (lib.attrsets.attrValues adminConfig.sshPubKeys); wireguardDevices ++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [ ])
wireguardDevices = ) [ ] (lib.attrsets.attrValues admins);
logins.wireguardDevices sshPubKeys = lib.lists.foldl (
++ (if adminConfig ? "wireguardDevices" then adminConfig.wireguardDevices else [ ]); sshPubKeys: adminConfig:
}) sshPubKeys
{ ++ (if adminConfig ? "sshPubKeys" then lib.attrsets.attrValues adminConfig.sshPubKeys else [ ])
sshPubKeys = [ ]; ) [ ] (lib.attrsets.attrValues admins);
wireguardDevices = [ ];
}
(lib.attrsets.attrValues admins);
robots.sshPubKeys = lib.attrsets.attrValues robots; robots.sshPubKeys = lib.attrsets.attrValues robots;
}; };
}; };

View file

@ -1,6 +1,8 @@
{ {
# Used for restic backups to droppie, a server run by @b12f # Used for restic backups to droppie, a server run by @b12f
"root@droppie" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZQSephFJU0NMbVbhwvVJ2/m6jcPYo1IsWCsoarqKin root@droppie"; "root@droppie" =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZQSephFJU0NMbVbhwvVJ2/m6jcPYo1IsWCsoarqKin root@droppie";
"hakkonaut" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGP5MvCwNRtCcP1pSDrn0XZTNlpOqYnjHDm9/OI4hECW hakkonaut"; "hakkonaut" =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGP5MvCwNRtCcP1pSDrn0XZTNlpOqYnjHDm9/OI4hECW hakkonaut";
} }

View file

@ -283,8 +283,10 @@ in
# Used for pub-solar-os.backups.repos.storagebox # Used for pub-solar-os.backups.repos.storagebox
programs.ssh.knownHosts = { programs.ssh.knownHosts = {
"u377325.your-storagebox.de".publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5EB5p/5Hp3hGW1oHok+PIOH9Pbn7cnUiGmUEBrCVjnAw+HrKyN8bYVV0dIGllswYXwkG/+bgiBlE6IVIBAq+JwVWu1Sss3KarHY3OvFJUXZoZyRRg/Gc/+LRCE7lyKpwWQ70dbelGRyyJFH36eNv6ySXoUYtGkwlU5IVaHPApOxe4LHPZa/qhSRbPo2hwoh0orCtgejRebNtW5nlx00DNFgsvn8Svz2cIYLxsPVzKgUxs8Zxsxgn+Q/UvR7uq4AbAhyBMLxv7DjJ1pc7PJocuTno2Rw9uMZi1gkjbnmiOh6TTXIEWbnroyIhwc8555uto9melEUmWNQ+C+PwAK+MPw=="; "u377325.your-storagebox.de".publicKey =
"[u377325.your-storagebox.de]:23".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5EB5p/5Hp3hGW1oHok+PIOH9Pbn7cnUiGmUEBrCVjnAw+HrKyN8bYVV0dIGllswYXwkG/+bgiBlE6IVIBAq+JwVWu1Sss3KarHY3OvFJUXZoZyRRg/Gc/+LRCE7lyKpwWQ70dbelGRyyJFH36eNv6ySXoUYtGkwlU5IVaHPApOxe4LHPZa/qhSRbPo2hwoh0orCtgejRebNtW5nlx00DNFgsvn8Svz2cIYLxsPVzKgUxs8Zxsxgn+Q/UvR7uq4AbAhyBMLxv7DjJ1pc7PJocuTno2Rw9uMZi1gkjbnmiOh6TTXIEWbnroyIhwc8555uto9melEUmWNQ+C+PwAK+MPw==";
"[u377325.your-storagebox.de]:23".publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
}; };
}; };
} }

View file

@ -54,9 +54,5 @@
}; };
time.timeZone = "Etc/UTC"; time.timeZone = "Etc/UTC";
home-manager.users.${config.pub-solar-os.authentication.username} = {
home.stateVersion = "23.05";
};
}; };
} }

View file

@ -1,9 +1,20 @@
{ flake, config, ... }: { flake, lib, ... }:
{ {
home-manager.users.${config.pub-solar-os.authentication.username} = { home-manager.users = (
lib.attrsets.foldlAttrs (
acc: name: value:
acc
// {
${name} = {
programs.git.enable = true; programs.git.enable = true;
programs.starship.enable = true; programs.starship.enable = true;
programs.bash.enable = true; programs.bash = {
enable = true;
historyControl = [
"ignoredups"
"ignorespace"
];
};
programs.neovim = { programs.neovim = {
enable = true; enable = true;
vimAlias = true; vimAlias = true;
@ -17,3 +28,6 @@
}; };
}; };
} }
) { } flake.self.logins.admins
);
}

View file

@ -11,18 +11,6 @@
inherit (lib) mkOption types; inherit (lib) mkOption types;
in in
{ {
username = mkOption {
description = "Username for the adminstrative user";
type = types.str;
default = flake.self.username;
};
sshPubKeys = mkOption {
description = "SSH Keys that should have administrative root access";
type = types.listOf types.str;
default = flake.self.logins.admins.sshPubKeys;
};
root.initialHashedPassword = mkOption { root.initialHashedPassword = mkOption {
description = "Hashed password of the root account"; description = "Hashed password of the root account";
type = types.str; type = types.str;
@ -43,22 +31,29 @@
}; };
config = { config = {
users.users.${config.pub-solar-os.authentication.username} = { users.users =
name = config.pub-solar-os.authentication.username; (lib.attrsets.foldlAttrs (
group = config.pub-solar-os.authentication.username; acc: name: value:
acc
// {
${name} = {
name = name;
group = name;
extraGroups = [ extraGroups = [
"wheel" "wheel"
"docker" "docker"
]; ];
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = config.pub-solar-os.authentication.sshPubKeys; openssh.authorizedKeys.keys = lib.attrsets.attrValues value.sshPubKeys;
}; };
users.groups.${config.pub-solar-os.authentication.username} = { }; }
) { } flake.self.logins.admins)
// {
# TODO: Remove when we stop locking ourselves out. # TODO: Remove when we stop locking ourselves out.
users.users.root.openssh.authorizedKeys.keys = config.pub-solar-os.authentication.sshPubKeys; root.openssh.authorizedKeys.keys = flake.self.logins.sshPubKeys;
root.initialHashedPassword = config.pub-solar-os.authentication.root.initialHashedPassword;
users.users.${config.pub-solar-os.authentication.robot.username} = { ${config.pub-solar-os.authentication.robot.username} = {
description = "CI and automation user"; description = "CI and automation user";
home = "/home/${config.pub-solar-os.authentication.robot.username}"; home = "/home/${config.pub-solar-os.authentication.robot.username}";
createHome = true; createHome = true;
@ -68,11 +63,28 @@
isSystemUser = true; isSystemUser = true;
openssh.authorizedKeys.keys = config.pub-solar-os.authentication.robot.sshPubKeys; openssh.authorizedKeys.keys = config.pub-solar-os.authentication.robot.sshPubKeys;
}; };
};
users.groups.${config.pub-solar-os.authentication.robot.username} = { }; home-manager.users = (
lib.attrsets.foldlAttrs (
acc: name: value:
acc
// {
${name} = {
home.stateVersion = "23.05";
};
}
) { } flake.self.logins.admins
);
users.users.root.initialHashedPassword = users.groups =
config.pub-solar-os.authentication.root.initialHashedPassword; (lib.attrsets.foldlAttrs (
acc: name: value:
acc // { "${name}" = { }; }
) { } flake.self.logins.admins)
// {
${config.pub-solar-os.authentication.robot.username} = { };
};
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
}; };

View file

@ -65,6 +65,7 @@
services.forgejo = { services.forgejo = {
enable = true; enable = true;
package = pkgs.forgejo;
user = "gitea"; user = "gitea";
group = "gitea"; group = "gitea";
database = { database = {
@ -75,7 +76,7 @@
}; };
stateDir = "/var/lib/forgejo"; stateDir = "/var/lib/forgejo";
lfs.enable = true; lfs.enable = true;
mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path; secrets.mailer.PASSWD = config.age.secrets.forgejo-mailer-password.path;
settings = { settings = {
DEFAULT.APP_NAME = "pub.solar git server"; DEFAULT.APP_NAME = "pub.solar git server";

View file

@ -43,7 +43,8 @@
services.nginx.virtualHosts."grafana.${config.pub-solar-os.networking.domain}" = { services.nginx.virtualHosts."grafana.${config.pub-solar-os.networking.domain}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}"; locations."/".proxyPass =
"http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
}; };
services.grafana = { services.grafana = {

View file

@ -50,7 +50,8 @@
hostname = "auth.${config.pub-solar-os.networking.domain}"; hostname = "auth.${config.pub-solar-os.networking.domain}";
http-host = "127.0.0.1"; http-host = "127.0.0.1";
http-port = 8080; http-port = 8080;
proxy = "edge"; proxy-headers = "xforwarded";
http-enabled = true;
}; };
themes = { themes = {
"pub.solar" = "pub.solar" =

View file

@ -16,6 +16,16 @@ let
synapseClientPort = "${toString listenerWithClient.port}"; synapseClientPort = "${toString listenerWithClient.port}";
in in
{ {
options.pub-solar-os = {
matrix.appservice-irc.mediaproxy = {
signingKeyPath = lib.mkOption {
description = "Path to file containing the IRC appservice mediaproxy signing key";
type = lib.types.str;
default = "/var/lib/matrix-appservice-irc/media-signingkey.jwk";
};
};
};
config = {
services.matrix-appservice-irc = { services.matrix-appservice-irc = {
enable = true; enable = true;
localpart = "irc_bot"; localpart = "irc_bot";
@ -25,7 +35,6 @@ in
homeserver = { homeserver = {
domain = "${config.pub-solar-os.networking.domain}"; domain = "${config.pub-solar-os.networking.domain}";
url = "http://127.0.0.1:${synapseClientPort}"; url = "http://127.0.0.1:${synapseClientPort}";
media_url = "https://matrix.${config.pub-solar-os.networking.domain}";
enablePresence = false; enablePresence = false;
}; };
ircService = { ircService = {
@ -43,6 +52,13 @@ in
matrixHandler = { matrixHandler = {
eventCacheSize = 4096; eventCacheSize = 4096;
}; };
mediaProxy = {
signingKeyPath = config.pub-solar-os.matrix.appservice-irc.mediaproxy.signingKeyPath;
# keep media for 2 weeks
ttlSeconds = 1209600;
bindPort = 11111;
publicUrl = "https:///matrix.${config.pub-solar-os.networking.domain}/media";
};
metrics = { metrics = {
enabled = true; enabled = true;
remoteUserAgeBuckets = [ remoteUserAgeBuckets = [
@ -124,4 +140,5 @@ in
}; };
}; };
}; };
};
} }

View file

@ -32,11 +32,6 @@ in
type = lib.types.str; type = lib.types.str;
default = "${config.services.matrix-synapse.dataDir}/homeserver.signing.key"; default = "${config.services.matrix-synapse.dataDir}/homeserver.signing.key";
}; };
sliding-sync.enable = lib.mkEnableOption {
description = "Whether to enable a sliding-sync proxy, no longer needed with synapse version 1.114+";
default = false;
};
}; };
matrix-authentication-service = { matrix-authentication-service = {
@ -124,6 +119,17 @@ in
enable_room_list_search = true; enable_room_list_search = true;
encryption_enabled_by_default_for_room_type = "off"; encryption_enabled_by_default_for_room_type = "off";
event_cache_size = "100K"; event_cache_size = "100K";
# https://github.com/element-hq/synapse/issues/11203
# No YAML deep-merge, so this needs to be in secret extraConfigFiles
# together with msc3861
#experimental_features = {
# # Room summary API
# msc3266_enabled = true;
# # Rendezvous server for QR Code generation
# msc4108_enabled = true;
#};
federation_rr_transactions_per_room_per_second = 50; federation_rr_transactions_per_room_per_second = 50;
federation_client_minimum_tls_version = "1.2"; federation_client_minimum_tls_version = "1.2";
forget_rooms_on_leave = true; forget_rooms_on_leave = true;
@ -328,24 +334,13 @@ in
}; };
}; };
services.matrix-sliding-sync = {
enable = config.pub-solar-os.matrix.synapse.sliding-sync.enable;
settings = {
SYNCV3_SERVER = "https://${publicDomain}";
SYNCV3_BINDADDR = "127.0.0.1:8011";
# The bind addr for Prometheus metrics, which will be accessible at
# /metrics at this address
SYNCV3_PROM = "127.0.0.1:9100";
};
environmentFile = config.age.secrets."matrix-synapse-sliding-sync-secret".path;
};
pub-solar-os.backups.restic.matrix-synapse = { pub-solar-os.backups.restic.matrix-synapse = {
paths = [ paths = [
"/var/lib/matrix-synapse" "/var/lib/matrix-synapse"
"/var/lib/matrix-appservice-irc" "/var/lib/matrix-appservice-irc"
"/var/lib/mautrix-telegram" "/var/lib/mautrix-telegram"
"/tmp/matrix-synapse-backup.sql" "/tmp/matrix-synapse-backup.sql"
"/tmp/matrix-authentication-service-backup.sql"
]; ];
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 05:00:00 Etc/UTC"; OnCalendar = "*-*-* 05:00:00 Etc/UTC";
@ -353,9 +348,11 @@ in
initialize = true; initialize = true;
backupPrepareCommand = '' backupPrepareCommand = ''
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d matrix > /tmp/matrix-synapse-backup.sql ${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d matrix > /tmp/matrix-synapse-backup.sql
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dump -d matrix-authentication-service > /tmp/matrix-authentication-service-backup.sql
''; '';
backupCleanupCommand = '' backupCleanupCommand = ''
rm /tmp/matrix-synapse-backup.sql rm /tmp/matrix-synapse-backup.sql
rm /tmp/matrix-authentication-service-backup.sql
''; '';
pruneOpts = [ pruneOpts = [
"--keep-daily 7" "--keep-daily 7"

View file

@ -139,6 +139,10 @@ let
// https://www.mediawiki.org/wiki/Extension:PluggableAuth#Configuration // https://www.mediawiki.org/wiki/Extension:PluggableAuth#Configuration
$wgPluggableAuth_EnableAutoLogin = false; $wgPluggableAuth_EnableAutoLogin = false;
$wgPluggableAuth_ButtonLabel = 'Login with pub.solar ID'; $wgPluggableAuth_ButtonLabel = 'Login with pub.solar ID';
// Avoid getting logged out after 30 minutes
// https://www.mediawiki.org/wiki/Topic:W4be4h6t63vf3y8p
// https://www.mediawiki.org/wiki/Manual:$wgRememberMe
$wgRememberMe = 'always';
// https://www.mediawiki.org/wiki/Extension:OpenID_Connect#Keycloak // https://www.mediawiki.org/wiki/Extension:OpenID_Connect#Keycloak
$wgPluggableAuth_Config[] = [ $wgPluggableAuth_Config[] = [
@ -211,7 +215,7 @@ in
backend = "docker"; backend = "docker";
containers."mediawiki" = { containers."mediawiki" = {
image = "git.pub.solar/pub-solar/mediawiki-oidc-docker:1.42.1"; image = "git.pub.solar/pub-solar/mediawiki-oidc-docker:1.43.0";
user = "1000:${builtins.toString gid}"; user = "1000:${builtins.toString gid}";
autoStart = true; autoStart = true;

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
flake, flake,
lib,
... ...
}: }:
{ {
@ -22,12 +23,32 @@
forceSSL = true; forceSSL = true;
}; };
services.nextcloud = { services.nextcloud =
let
exiftool_1270 = pkgs.perlPackages.buildPerlPackage rec {
# NOTE nextcloud-memories needs this specific version of exiftool
pname = "Image-ExifTool";
version = "12.70";
src = pkgs.fetchFromGitHub {
owner = "exiftool";
repo = "exiftool";
rev = version;
hash = "sha256-YMWYPI2SDi3s4KCpSNwovemS5MDj5W9ai0sOkvMa8Zg=";
};
nativeBuildInputs = lib.optional pkgs.stdenv.hostPlatform.isDarwin pkgs.shortenPerlShebang;
postInstall = lib.optionalString pkgs.stdenv.hostPlatform.isDarwin ''
shortenPerlShebang $out/bin/exiftool
'';
};
in
{
hostName = "cloud.${config.pub-solar-os.networking.domain}"; hostName = "cloud.${config.pub-solar-os.networking.domain}";
home = "/var/lib/nextcloud"; home = "/var/lib/nextcloud";
enable = true; enable = true;
package = pkgs.nextcloud29; # When updating package, remember to update nextcloud30Packages in
# services.nextcloud.extraApps
package = pkgs.nextcloud30;
https = true; https = true;
secretFile = config.age.secrets."nextcloud-secrets".path; # secret secretFile = config.age.secrets."nextcloud-secrets".path; # secret
maxUploadSize = "1G"; maxUploadSize = "1G";
@ -45,7 +66,6 @@
dbuser = "nextcloud"; dbuser = "nextcloud";
dbtype = "pgsql"; dbtype = "pgsql";
dbname = "nextcloud"; dbname = "nextcloud";
dbtableprefix = "oc_";
}; };
settings = { settings = {
@ -73,21 +93,39 @@
allow_local_remote_servers = true; allow_local_remote_servers = true;
enable_previews = true; enable_previews = true;
jpeg_quality = 60;
enabledPreviewProviders = [ enabledPreviewProviders = [
"OC\\Preview\\PNG" "OC\\Preview\\PNG"
"OC\\Preview\\JPEG" "OC\\Preview\\JPEG"
"OC\\Preview\\GIF" "OC\\Preview\\GIF"
"OC\\Preview\\BMP" "OC\\Preview\\BMP"
"OC\\Preview\\HEIC"
"OC\\Preview\\TIFF"
"OC\\Preview\\XBitmap" "OC\\Preview\\XBitmap"
"OC\\Preview\\SVG"
"OC\\Preview\\WebP"
"OC\\Preview\\Font"
"OC\\Preview\\Movie" "OC\\Preview\\Movie"
"OC\\Preview\\PDF" "OC\\Preview\\ImaginaryPDF"
"OC\\Preview\\MP3" "OC\\Preview\\MP3"
"OC\\Preview\\OpenDocument"
"OC\\Preview\\Krita"
"OC\\Preview\\TXT" "OC\\Preview\\TXT"
"OC\\Preview\\MarkDown" "OC\\Preview\\MarkDown"
"OC\\Preview\\Imaginary"
]; ];
preview_max_x = "1024"; preview_imaginary_url = "http://127.0.0.1:${toString config.services.imaginary.port}/";
preview_max_y = "768"; preview_max_filesize_image = 128; # MB
preview_max_scale_factor = "1"; preview_max_memory = 512; # MB
preview_max_x = 2048; # px
preview_max_y = 2048; # px
preview_max_scale_factor = 1;
"preview_ffmpeg_path" = lib.getExe pkgs.ffmpeg-headless;
"memories.exiftool_no_local" = false;
"memories.exiftool" = "${exiftool_1270}/bin/exiftool";
"memories.vod.ffmpeg" = lib.getExe pkgs.ffmpeg;
"memories.vod.ffprobe" = lib.getExe' pkgs.ffmpeg-headless "ffprobe";
auth.bruteforce.protection.enabled = true; auth.bruteforce.protection.enabled = true;
trashbin_retention_obligation = "auto,7"; trashbin_retention_obligation = "auto,7";
@ -132,10 +170,81 @@
}; };
caching.redis = true; caching.redis = true;
appstoreEnable = true;
autoUpdateApps.enable = true; autoUpdateApps.enable = true;
extraApps = {
inherit (pkgs.nextcloud30Packages.apps) memories previewgenerator recognize;
};
database.createLocally = true; database.createLocally = true;
}; };
# https://docs.nextcloud.com/server/30/admin_manual/installation/server_tuning.html#previews
services.imaginary = {
enable = true;
address = "127.0.0.1";
settings.return-size = true;
};
systemd = {
services =
let
occ = "/run/current-system/sw/bin/nextcloud-occ";
in
{
nextcloud-cron-preview-generator = {
environment.NEXTCLOUD_CONFIG_DIR = "${config.services.nextcloud.home}/config";
serviceConfig = {
ExecStart = "${occ} preview:pre-generate";
Type = "oneshot";
User = "nextcloud";
};
};
nextcloud-preview-generator-setup = {
wantedBy = [ "multi-user.target" ];
requires = [ "phpfpm-nextcloud.service" ];
after = [ "phpfpm-nextcloud.service" ];
environment.NEXTCLOUD_CONFIG_DIR = "${config.services.nextcloud.home}/config";
script = # bash
''
# check with:
# for size in squareSizes widthSizes heightSizes; do echo -n "$size: "; nextcloud-occ config:app:get previewgenerator $size; done
# extra commands run for preview generator:
# 32 icon file list
# 64 icon file list android app, photos app
# 96 nextcloud client VFS windows file preview
# 256 file app grid view, many requests
# 512 photos app tags
${occ} config:app:set --value="32 64 96 256 512" previewgenerator squareSizes
# 341 hover in maps app
# 1920 files/photos app when viewing picture
${occ} config:app:set --value="341 1920" previewgenerator widthSizes
# 256 hover in maps app
# 1080 files/photos app when viewing picture
${occ} config:app:set --value="256 1080" previewgenerator heightSizes
'';
serviceConfig = {
Type = "oneshot";
User = "nextcloud";
};
};
};
timers.nextcloud-cron-preview-generator = {
after = [ "nextcloud-setup.service" ];
timerConfig = {
OnCalendar = "*:0/10";
OnUnitActiveSec = "9m";
Persistent = true;
RandomizedDelaySec = 60;
Unit = "nextcloud-cron-preview-generator.service";
};
wantedBy = [ "timers.target" ];
};
};
services.restic.backups.nextcloud-storagebox = { services.restic.backups.nextcloud-storagebox = {
paths = [ paths = [
"/var/lib/nextcloud/data" "/var/lib/nextcloud/data"

View file

@ -24,14 +24,6 @@ let
secure_backup_required = false; secure_backup_required = false;
secure_backup_setup_methods = [ ]; secure_backup_setup_methods = [ ];
}; };
"m.integrations" = {
managers = [
{
api_url = "https://dimension.${domain}/api/v1/scalar";
ui_url = "https://dimension.${domain}/element";
}
];
};
}; };
wellKnownServer = domain: { "m.server" = "matrix.${domain}:8448"; }; wellKnownServer = domain: { "m.server" = "matrix.${domain}:8448"; };
wellKnownSupport = { wellKnownSupport = {
@ -128,6 +120,13 @@ in
extraConfig = commonHeaders; extraConfig = commonHeaders;
}; };
# For IRC appservice media proxy
"/media" = {
priority = 100;
proxyPass = "http://127.0.0.1:${toString (config.services.matrix-appservice-irc.settings.ircService.mediaProxy.bindPort)}";
extraConfig = commonHeaders;
};
# Forward to the auth service # Forward to the auth service
"~ ^/_matrix/client/(.*)/(login|logout|refresh)" = { "~ ^/_matrix/client/(.*)/(login|logout|refresh)" = {
priority = 100; priority = 100;

View file

@ -50,4 +50,15 @@
# FUTUREWORK: Replace with pub.solar logo # FUTUREWORK: Replace with pub.solar logo
auth_header_logo_url = "themes/element/img/logos/element-logo.svg"; auth_header_logo_url = "themes/element/img/logos/element-logo.svg";
}; };
# Enable Element Call Beta
features = {
feature_video_rooms = true;
feature_group_calls = true;
feature_element_call_video_rooms = true;
};
element_call = {
url = "https://call.element.io";
participant_limit = 50;
brand = "Element Call";
};
} }

View file

@ -10,7 +10,7 @@
# Please create this manually the first time. # Please create this manually the first time.
hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ]; hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ];
authorizedKeys = config.pub-solar-os.authentication.sshPubKeys; authorizedKeys = flake.self.logins.sshPubKeys;
}; };
postCommands = '' postCommands = ''
# Automatically ask for the password on SSH login # Automatically ask for the password on SSH login

View file

@ -11,7 +11,7 @@
# Please create this manually the first time. # Please create this manually the first time.
hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ]; hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ];
authorizedKeys = config.pub-solar-os.authentication.sshPubKeys; authorizedKeys = flake.self.logins.sshPubKeys;
}; };
# this will automatically load the zfs password prompt on login # this will automatically load the zfs password prompt on login
# and kill the other prompt so boot can continue # and kill the other prompt so boot can continue

View file

@ -1,7 +1,7 @@
{ self, inputs, ... }: { inputs, ... }:
{ {
flake = { flake = {
nixosModules = rec { nixosModules = {
overlays = ( overlays = (
{ ... }: { ... }:
{ {
@ -12,12 +12,11 @@
unstable = import inputs.unstable { system = prev.system; }; unstable = import inputs.unstable { system = prev.system; };
in in
{ {
matrix-authentication-service = unstable.matrix-authentication-service;
element-themes = prev.callPackage ./pkgs/element-themes { inherit (inputs) element-themes; }; element-themes = prev.callPackage ./pkgs/element-themes { inherit (inputs) element-themes; };
element-stickerpicker = prev.callPackage ./pkgs/element-stickerpicker { element-stickerpicker = prev.callPackage ./pkgs/element-stickerpicker {
inherit (inputs) element-stickers maunium-stickerpicker; inherit (inputs) element-stickers maunium-stickerpicker;
}; };
mastodon = unstable.mastodon;
matrix-authentication-service = unstable.matrix-authentication-service;
} }
) )
]; ];

View file

@ -1,45 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 iDKjwg GPTqfaZZC6ze7BUkT1uF4VslvE29BFKm0+AlJk+DKQQ
GxI7erqw8p3GrCArh5vZOiTmYh40DVisCphNyFhNTqM
-> ssh-ed25519 uYcDNw oo52Nh9BCO5NNF0YyzracKfvMifSiREsxyQqiRZ6WTs
JvqwRX5yOMtEYgWyc7dIQs85wDghMRHQCIi6t5QxIwo
-> ssh-rsa f5THog
w+B5hc0E9u1fFWNNPaTtPmJfPJWUBbRwHYK/T69g2ORNfaBYynl0LL4vSUs8o9Gw
rwBY+cLpth6e4tS819H5C7HtvT47KR3KF8JLxVjA2mbVO83+BnWFjThjYB452CdI
KZvQQPhkSH/43YF6pjxnQjNWB/wroScyjGVtUamcij7YHxt71z0AAnyqE5PgWEc6
6/ao5gLfTKhcWpxkTTz8LHn05s9IppXywDrvpwtJaU8LKgJT2H6Epsaci348lG+I
tAZYODhQqP+yKl92DZbuQQCjxH5CJfhdBs2ZR63hQPj9OrIFRjLg4V+1gdcxzAuz
9FwwIeLq3uxWXPdwTRR8RUsHEGhKMcVty4PkW0vlt+VwZrZBhdz3k+ApVG7Jvclz
MPZYLzKC0DiODqPuA23ye6suFRCHXYfq3ZyCIIN6wOci0X0crSr9ZXW4M8R7aWaZ
XDeZRaUgvd54WI0HZhVWBvJQyswgUXf+/RkS4aI8IgnNV801x12h+mTdWX9BC/cD
YRIWBnGkfTX4WM4OEE2VEgqSDuKl/90o2LFIquIIJULVd2Vs5C2S8FhJcsT7+HmL
TFWnLeIfGbw7RDUeH0c/Bbg9NK11SZF0/VdRZcBQ/zIXBMBlL1EZsH1HfIfhKISN
PyHFB5kfmuVIBhDXgtDdgjKfDmQL9/9Aq1U4ZMBcUKA
-> ssh-rsa kFDS0A
KysKtr7wrKKJ8w+Dj7qjJstyXtKIw9weFi9oVwJkMvy2utn+JARs7puh7KC27TXC
slZJrHf4vx+y8qSjRS0W4z8CPl8/auiYOilepT9JoxwGUP7J/nTr5SCofgWcdZm5
FtgHoCcABjzcF+mrKUofuqrx6oYSDCS0JkV2tClQI6ybXnjRwIIicLmBN9UDHCuU
9ZOesYp5XrJyBoD3Zv51b19xJyOfuWAUQvlNPRH2TpgvisutpESU/o869z5AMn4Z
BfDD/0oR1ALbk/sB3r13Xi6oJZAB2AbggoQRlwvPeWc3MdS+bFNV2o2ue0ov6Fkd
U5C/GnJVlyE0cv9I+YvxtLT6T/Gf/yoUZGfB7xD5QkHpMIEmKxUYqGNBB/NcnFMY
Tal8jMDtZDEk+uk0MahE7GsL6Z3xrkKTevG+Rr3j+beFYie2RJbNwwUyQ1lL3EoA
Rx1AMk+nYlvxVHiciYJNh9nffgAXXwO255IkWvYzmuPBEP1LmqadA4fQPf5Rgj3u
DuOX3hJ+rIyRIoDXOZio3SDf+bb380xCxF+7efJ27Ep0sFviAq5qKeptbyt51Dp8
tlbeYAylhVbV9Zgd+EozwE7Btlfqt3sbUij/0Iy+BdOYSPLmvx3oKybpipZ0i3fo
KR/bZHlMKF1Ipd5L7zEwh5aTjImuomoyRyZG3NWdv44
-> piv-p256 vRzPNw A7FwWUuml/VyHcOmha3R/DOg1RvnRXcwjaJJH/sgmsBR
+CP1/qY8sHbR7nkFl1T5HPsjYLRPDCSR01DEJaim96o
-> piv-p256 zqq/iw AgYhaJWqe+QbVCHkXsU7AQhWhte/fjwVbOgmHVRPHsEE
7jNmDI62i/9RakJhbo3MP0qMgXYGlhAW9BKo8HLWQYc
-> ssh-ed25519 YFSOsg cGPMyhqcd20TDBeMkSDJ8hQ/vE9cuDgVi1hfcwAKVjw
U9GRSr607w5oUGr0rC6XqdWMD65JidY/Ri3Ex1dmGXI
-> ssh-ed25519 iHV63A cW7bblsvL1TwI6lp8KjPfUwB5EzWilLhc6Z2geE3SQw
PzBdZ/LXA7iGI7ZjErredqC7ehHsr5MCY3qENv0nZI8
-> ssh-ed25519 BVsyTA AGDqp6Rrp2vStBU9+eJMGf5O4SZQIASE63n8vbf8PEs
SFakjoivQrFkSUBGZ9sISKVhAxNOpc2RxugiBTSK9/k
-> ssh-ed25519 +3V2lQ MmMv45CQFAdgkV/B7InOY22iXzvIU8TY41SV5Jxx7RQ
vNIRE5wSXVzy4miZLV90T1TEOhOjYQT12GWtZpsTxJ8
--- EBBXvYr1OpETpgXOsUfJn6h1e4rXF+olz6DbhDUWCcw
.Œ
ösÊ~¦—åHͯk 2 ¦À9<C380> ¶§ Bz¤¨?°3ëþTÇJ`§gº¦P°çioÙÜr<C39C>Š€" ØÝöwÒs-K€6©òšfÝ
ß0XÎŒvùXª&£8 š¶gÐ=ÄzrH¥jh>

View file

@ -67,12 +67,14 @@ in
"matrix-mautrix-telegram-env-file.age".publicKeys = nachtigallKeys ++ adminKeys; "matrix-mautrix-telegram-env-file.age".publicKeys = nachtigallKeys ++ adminKeys;
"matrix-synapse-signing-key.age".publicKeys = nachtigallKeys ++ adminKeys; "matrix-synapse-signing-key.age".publicKeys = nachtigallKeys ++ adminKeys;
"matrix-synapse-secret-config.yaml.age".publicKeys = nachtigallKeys ++ adminKeys; "matrix-synapse-secret-config.yaml.age".publicKeys = nachtigallKeys ++ adminKeys;
"matrix-synapse-sliding-sync-secret.age".publicKeys = nachtigallKeys ++ adminKeys;
"matrix-authentication-service-secret-config.yml.age".publicKeys = nachtigallKeys ++ adminKeys; "matrix-authentication-service-secret-config.yml.age".publicKeys = nachtigallKeys ++ adminKeys;
"matrix-appservice-irc-mediaproxy-signing-key.jwk.age".publicKeys = nachtigallKeys ++ adminKeys;
"staging-matrix-synapse-secret-config.yaml.age".publicKeys = undergroundKeys ++ adminKeys; "staging-matrix-synapse-secret-config.yaml.age".publicKeys = undergroundKeys ++ adminKeys;
"staging-matrix-authentication-service-secret-config.yml.age".publicKeys = "staging-matrix-authentication-service-secret-config.yml.age".publicKeys =
undergroundKeys ++ adminKeys; undergroundKeys ++ adminKeys;
"staging-matrix-appservice-irc-mediaproxy-signing-key.jwk.age".publicKeys =
undergroundKeys ++ adminKeys;
"nextcloud-secrets.age".publicKeys = nachtigallKeys ++ adminKeys; "nextcloud-secrets.age".publicKeys = nachtigallKeys ++ adminKeys;
"nextcloud-admin-pass.age".publicKeys = nachtigallKeys ++ adminKeys; "nextcloud-admin-pass.age".publicKeys = nachtigallKeys ++ adminKeys;

View file

@ -46,6 +46,7 @@ in
systemd.tmpfiles.rules = [ "f /tmp/dbf 1777 root root 10d password" ]; systemd.tmpfiles.rules = [ "f /tmp/dbf 1777 root root 10d password" ];
virtualisation.cores = 1;
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
pub-solar-os.auth = { pub-solar-os.auth = {
@ -66,7 +67,7 @@ in
testScript = testScript =
{ nodes, ... }: { nodes, ... }:
let let
user = nodes.client.users.users.${nodes.client.pub-solar-os.authentication.username}; user = nodes.client.users.users.b12f;
#uid = toString user.uid; #uid = toString user.uid;
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u ${user.name})/bus"; bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u ${user.name})/bus";
gdbus = "${bus} gdbus"; gdbus = "${bus} gdbus";
@ -81,6 +82,8 @@ in
nachtigall.succeed("ping 127.0.0.1 -c 2") nachtigall.succeed("ping 127.0.0.1 -c 2")
nachtigall.wait_for_unit("nginx.service") nachtigall.wait_for_unit("nginx.service")
nachtigall.wait_for_unit("keycloak.service") nachtigall.wait_for_unit("keycloak.service")
nachtigall.wait_for_open_port(8080)
nachtigall.wait_for_open_port(443)
nachtigall.wait_until_succeeds("curl http://127.0.0.1:8080/") nachtigall.wait_until_succeeds("curl http://127.0.0.1:8080/")
nachtigall.wait_until_succeeds("curl https://auth.test.pub.solar/") nachtigall.wait_until_succeeds("curl https://auth.test.pub.solar/")

View file

@ -11,7 +11,7 @@
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.autoLogin.enable = true; services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = config.pub-solar-os.authentication.username; services.xserver.displayManager.autoLogin.user = "b12f";
systemd.user.services = { systemd.user.services = {
"org.gnome.Shell@wayland" = { "org.gnome.Shell@wayland" = {

View file

@ -31,6 +31,7 @@
./support/global.nix ./support/global.nix
]; ];
virtualisation.cores = 1;
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
networking.interfaces.eth0.ipv4.addresses = [ networking.interfaces.eth0.ipv4.addresses = [
@ -48,12 +49,14 @@
acme_server.wait_for_unit("system.slice") acme_server.wait_for_unit("system.slice")
acme_server.wait_for_unit("step-ca.service") acme_server.wait_for_unit("step-ca.service")
acme_server.succeed("ping ca.test.pub.solar -c 2") acme_server.succeed("ping ca.test.pub.solar -c 2")
acme_server.wait_for_open_port(443)
acme_server.wait_until_succeeds("curl 127.0.0.1:443") acme_server.wait_until_succeeds("curl 127.0.0.1:443")
nachtigall.wait_for_unit("system.slice") nachtigall.wait_for_unit("system.slice")
nachtigall.succeed("ping test.pub.solar -c 2") nachtigall.succeed("ping test.pub.solar -c 2")
nachtigall.succeed("ping ca.test.pub.solar -c 2") nachtigall.succeed("ping ca.test.pub.solar -c 2")
nachtigall.wait_for_unit("nginx.service") nachtigall.wait_for_unit("nginx.service")
nachtigall.wait_for_open_port(443, "test.pub.solar")
nachtigall.wait_until_succeeds("curl https://test.pub.solar/") nachtigall.wait_until_succeeds("curl https://test.pub.solar/")
''; '';
} }