3
1
Fork
You've already forked server-config
0
No description
Nix 69.1%
HTML 30.5%
Python 0.4%
2026年01月08日 16:39:22 +01:00
calendar-export update calendar-export, nixpkgs 2024年08月01日 09:04:30 +02:00
nextcloud Add 'mijn' 2025年11月05日 01:35:34 +01:00
roundcube-assets roundcube: add logo to login 2025年11月08日 15:23:02 +01:00
secrets cleanup 2025年12月07日 22:55:50 +01:00
www-test update admin-sync and website test 2024年05月24日 10:15:47 +02:00
.gitattributes document how to diff secrets in git 2025年07月15日 22:57:45 +02:00
.gitignore Move to flake 2024年01月02日 22:46:21 +01:00
acme.age give emiel access to secrets 2025年06月24日 10:16:10 +02:00
admin-sync.nix pass credentials to forms-to-doc script more neatly 2026年01月04日 01:21:28 +01:00
authserver.py manage mailbox secrets with agenix 2025年06月20日 11:37:17 +02:00
bibliotheekcatalogus.nix finish migration of collectie to nixos module, prepare for bieb 2026年01月04日 01:21:04 +01:00
calendar-export.nix Suppoostenrapportage naar aparte map Suppoostencoordinatie 2025年11月19日 10:37:53 +01:00
collectie-skip-validation-for-private-items.patch finish migration of collectie to nixos module, prepare for bieb 2026年01月04日 01:21:04 +01:00
collectie.age give emiel access to secrets 2025年06月24日 10:16:10 +02:00
collectie.nix finish migration of collectie to nixos module, prepare for bieb 2026年01月04日 01:21:04 +01:00
common.nix finish migration of collectie to nixos module, prepare for bieb 2026年01月04日 01:21:04 +01:00
configuration.nix mailrelay migration 2025年06月05日 12:53:01 +02:00
creds.txt.example Commit encrypted secrets 2023年06月14日 11:27:25 +02:00
flake.lock updates, notably rugstickers and documentserver 2026年01月08日 16:13:36 +01:00
flake.nix updates, notably rugstickers and documentserver 2026年01月08日 16:13:36 +01:00
hardware-configuration.nix Move to flake 2024年01月02日 22:46:21 +01:00
hetzner2-disk-config.nix progress on nixos-anywhere nextcloud deployment 2025年02月18日 18:37:01 +01:00
hetzner2.nix finish migration of collectie to nixos module, prepare for bieb 2026年01月04日 01:21:04 +01:00
mailbox-credentials.toml.age mailbox access update 2026年01月08日 16:39:22 +01:00
mailinglists.yaml.age mailbox access update 2026年01月08日 16:39:22 +01:00
mailrelay.nix cleanup 2025年12月07日 22:55:50 +01:00
monitoring.nix remove comment 2023年09月21日 14:18:53 +02:00
nc.age update admin-sync, token toke 2025年11月19日 10:37:03 +01:00
ncadminpass.age give emiel access to secrets 2025年06月24日 10:16:10 +02:00
ncsecretsettings.age give emiel access to secrets 2025年06月24日 10:16:10 +02:00
networking.nix Move to flake 2024年01月02日 22:46:21 +01:00
nextcloud-disable-email.patch Add an option to disable email 2025年02月04日 22:42:19 +01:00
nextcloud-no-decrypt-retry.patch progress on nixos-anywhere nextcloud deployment 2025年02月18日 18:37:01 +01:00
nextcloud-password-policy-log-when-disabling.patch log when disabling user for invalid logins 2025年08月31日 15:31:36 +02:00
nextcloud.nix updates, notably rugstickers and documentserver 2026年01月08日 16:13:36 +01:00
nginx-no-proxy-auth.patch Use a local mailserver for (some) outgoing mail 2023年09月17日 12:29:29 +02:00
notificaties.age update notificatielijst 2025年11月04日 21:47:31 +01:00
onlyoffice-jwt.age give emiel access to secrets 2025年06月24日 10:16:10 +02:00
onlyoffice-nonce.age update 2025年11月27日 18:24:05 +01:00
other-secrets.age pw 2025年11月22日 15:36:17 +01:00
outgoing-mailserver.nix update 2025年09月18日 14:50:29 +02:00
personal.yaml.age ondertekening 2025年12月27日 10:45:30 +01:00
README.md document mailinglist/signature updates 2025年09月23日 10:00:03 +02:00
roundcube.nix More EICAS theming for webmail 2025年11月10日 11:25:22 +01:00
secrets.nix update 2025年11月27日 18:24:05 +01:00
stats.age update admin-sync 2025年11月08日 12:18:52 +01:00
stunnel.conf Configure mailrelay as systemd service 2023年06月12日 15:07:45 +02:00

EICAS server config

Initial deploy

On Hetzner:

Create a machine and add cloud-config:

#cloud-config
runcmd:
 - curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-unstable bash 2>&1 | tee /tmp/infect.log

Edit DNS so relevant hostnames point to this IP, like hetzner.eicas.nl and updating the SPF record to allow email through this IP

  • get public host key with ssh-keyscan <IP>
  • add to secrets.nix
  • nix develop
  • agenix --rekey
  • NIX_SSHOPTS=... nixos-rebuild ....

Then manually:

  • if nextcloud-setup.service fails to create the Nextcloud instance, you may need to delete the (likely-empty) /var/lib/nextcloud/config/config.php and retry

Test if configuration builds

Copy the networking.nix and hardware-configuration.nix from the deployed machine:

scp it@hetzner.eicas.nl:/etc/nixos/networking.nix .
scp it@hetzner.eicas.nl:/etc/nixos/hardware-configuration.nix .

Then build:

nixos-rebuild --flake .#hetzner build

Update

Copy the networking.nix and hardware-configuration.nix from the deployed machine:

scp it@hetzner.eicas.nl:/etc/nixos/networking.nix .
scp it@hetzner.eicas.nl:/etc/nixos/hardware-configuration.nix .

Then deploy:

nixos-rebuild --flake .#hetzner --use-remote-sudo --target-host it@hetzner.eicas.nl switch
nixos-rebuild --flake .#hetzner2 --use-remote-sudo --target-host it@hetzner2.eicas.nl switch

Secrets

Edit a secret:

agenix -e ./mailinglists.yaml.age

Add a new secret:

  • add to secrets.nix
  • add age.secrets.foo to configuration.nix
  • use as config.age.secrets.foo.path

Secrets and git diff/git show

To see secrets in git diff and git show and the like, add the following to your .git/config:

[core]
	pager = cat
[diff "age"]
	textconv = age -d -i ~/.ssh/id_ed25519

The 'pager = cat' is only needed if you have password-protected your private key, to avoid the pager from messing with the password input.

Administration

Roundcube

Manual database connection: nix-shell -p postgresql --run "sudo -u postgres psql roundcube"

Updating mailinglists

To update credentials: agenix -e mailbox-credentials.toml.age

To update signatures: agenix -e mailinglists.toml.age and run sudo systemctl start update-signatures.service. (this cannot happen automatically periodically because it breaks draft emails until we finish eicas/admin-sync#7)