Commit graph

697 commits

Author SHA1 Message Date
258bcac597 Integrate Kanidm with Nextcloud via OIDC
Added Kanidm identity provider integration with Nextcloud:
- Enabled Kanidm client in kanidm.nix for CLI access
- Added user_oidc app to Nextcloud for OpenID Connect authentication
- Configured allow_local_remote_servers to permit Nextcloud to reach
  Kanidm at auth.baduhai.dev (resolves to local IP 192.168.15.142)

OAuth2 client configuration (done via kanidm CLI):
- Client ID: nextcloud
- Scopes: openid, email, profile mapped to idm_all_accounts group
- Redirect URI: https://cloud.baduhai.dev/apps/user_oidc/code
- User mapping: name claim maps to Nextcloud username

This allows users to authenticate to Nextcloud using their Kanidm
credentials, with existing Nextcloud accounts linked via username.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:56:40 -03:00
58fec03579 Switch ACME to DNS-01 challenge with auto-configured certificates
Changed certificate generation from HTTP-01 to DNS-01 challenge to support
services behind Tailscale/CGNAT IPs. HTTP-01 challenges fail because Let's
Encrypt cannot reach private Tailscale IPs (100.x.x.x) that Cloudflare DNS
points to.

Changes:
- Pre-configure certificates in security.acme.certs using DNS-01 via Cloudflare
- Auto-generate certificate configs from shared/services.nix
  - Alexandria: filters services with host == "alexandria"
  - Trantor: filters services with host == "trantor"
- Updated mkNginxVHosts to use useACMEHost instead of enableACME
- Each domain gets its own certificate configured with DNS-01 challenge

This ensures all services get valid Let's Encrypt certificates even when
accessible only through Tailscale or private networks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 22:53:18 -03:00
952a55f03d Add Kanidm identity provider to alexandria
Added Kanidm server configuration to serve as central identity provider for
all services. Configuration includes:
- Server on auth.baduhai.dev with HTTPS
- LDAP support on port 636 for legacy integrations
- Nginx reverse proxy with SSL termination
- Added to shared services for DNS resolution

Kanidm will provide OAuth2/OIDC authentication for Nextcloud, Vaultwarden,
Forgejo, and other services.
2025-11-08 22:24:37 -03:00
73db534269 Switch from wildcard to per-domain SSL certificates
Updated mkNginxVHosts to use per-domain certificates (enableACME) instead
of shared wildcard certificates (useACMEHost). Each service now requests
its own certificate, avoiding conflicts between hosts and following the
principle of least privilege.

Removed wildcard certificate configuration from both alexandria and trantor.
Each host now only obtains certificates for domains it actually serves:
- Alexandria: pass.baduhai.dev, cloud.baduhai.dev, jellyfin.baduhai.dev
- Trantor: git.baduhai.dev
2025-11-08 21:47:41 -03:00
34622a05cb Move forgejo from alexandria to trantor
Migrated forgejo service and configuration to trantor. Added nginx reverse
proxy support on trantor with ACME configuration for SSL certificates.

Fixed vaultwarden domain in shared services from vault.baduhai.dev to
pass.baduhai.dev to match actual nginx configuration.
2025-11-08 21:47:16 -03:00
ee1a7c4d18 Split DNS servers: alexandria for LAN, trantor for tailnet
Alexandria's unbound now only serves LAN clients (192.168.0.0/16) and
returns LAN IPs for service domains.

Created new unbound instance on trantor to serve Tailscale clients
(100.64.0.0/10) and return tailscale IPs for service domains.

Both configurations pull service records from shared/services.nix.
2025-11-08 21:35:53 -03:00
8d8847e2fb Remove split DNS module and per-service entries
Removed the split-dns.nix module and all service-specific splitDNS.entries
configurations. Service DNS records are now sourced from the centralized
shared/services.nix file instead of being declared individually in each
service configuration.
2025-11-08 21:35:33 -03:00
af444584d0 Add shared services infrastructure for cross-host data
Created centralized service definitions in shared/services.nix to store
service metadata (domains, IPs, ports) that need to be accessible across
multiple hosts. This replaces the per-service split DNS module approach
with a single source of truth.

Services are now exported through utils.nix for easy access in host configs.
2025-11-08 21:35:13 -03:00
2289f0e6e4 beginnings of split dns 2025-11-08 20:47:21 -03:00
a1369e5818 rekeyd secrets 2025-11-08 20:46:38 -03:00
d3ef56c724 add presenterm to desktops 2025-11-07 11:55:27 -03:00
45f89a1663 add claude-code back 2025-11-07 07:15:12 -03:00
6ec815a766 fix disko usage for io 2025-11-06 19:59:58 -03:00
cb59a911d6 added ai tag for desktop hosts 2025-11-06 19:57:04 -03:00
97450f0057 no more protonup 2025-11-04 08:13:16 -03:00
d6f582fffd no diskoConfirations outputs 2025-11-03 22:03:02 -03:00
f5f1541aec fixing trantor 2025-11-03 17:19:21 -03:00
fe091504d0 openssh greeting fixes 2025-11-03 14:46:37 -03:00
697a9f2cab wrap fastfetch with config; run fastfetch on ssh login 2025-11-03 10:55:14 -03:00
716ed5cc53 trator terranix config functional; move disko configs to individual outputs; touching up trantor 2025-11-03 08:07:43 -03:00
a8977d7dfb greetd only autologin on io 2025-10-29 11:00:50 -03:00
98b2d1f44c niri xdg desktop portal config 2025-10-24 17:55:55 -03:00
8254683b5f set collate locale option 2025-10-23 18:58:20 -03:00
db4b93273e kdeconnect: use valent instead; ghostty: set up shift+enter 2025-10-22 14:16:52 -03:00
39d1602864 xdg portals 2025-10-22 11:58:03 -03:00
66d5275f7d no more better-control; niri config spacing 2025-10-21 13:57:49 -03:00
30ca5f6b29 kde connect needs to be enabled both in the user as the host 2025-10-21 13:12:40 -03:00
5969f2ba9f default desktop programs 2025-10-21 10:22:05 -03:00
c32c37596f io needs battery management 2025-10-21 07:22:35 -03:00
831b9c95cd better-control for desktops 2025-10-20 17:38:05 -03:00
6d3ceccf93 finalising niri config on io 2025-10-20 14:10:18 -03:00
0758864078 niri fully in home manager now 2025-10-20 10:29:16 -03:00
ce1af87bdf finally, niri is finished 2025-10-18 18:43:23 -03:00
0b17f03dde disable nextcloud appstore 2025-10-18 16:17:08 -03:00
3164e1ebf2 add helix editor to all systems 2025-10-18 15:55:52 -03:00
14457d1ec2 modifications to nextcloud apps 2025-10-18 15:55:37 -03:00
7da7b7167a i give up on nextcloud office 2025-10-18 15:26:32 -03:00
f5a7377b1f nextcloud desktop client 2025-10-17 11:51:11 -03:00
f9874296ae expose nextcloud and collabora on proxy 2025-10-17 11:47:04 -03:00
d0793fb125 I'm forced to map a port in librespeed 2025-10-17 11:07:55 -03:00
c6b5cc16c1 don't touch nextcloud apps 2025-10-17 11:01:23 -03:00
681f68d790 nexcloud on 25.05 is still at version 31 2025-10-17 09:47:40 -03:00
c8f1b3a5e0 fix mkNginxVHosts usage; fix librespeed proxy; fix vaultwarden proxy 2025-10-17 08:37:09 -03:00
ee1ed3b88e Merge branch 'refactor' 2025-10-17 07:27:29 -03:00
f7b1734576 no more dav 2025-10-16 19:37:06 -03:00
51b6a62f91 new mkNginxVHosts function 2025-10-16 19:36:46 -03:00
0adbcc838b merged rclone-webdav with radicale 2025-10-16 19:16:24 -03:00
0cf06f8541 som more deploy-rs mods 2025-10-16 15:30:01 -03:00
af7467554f update nextcloud 2025-10-16 15:05:58 -03:00
b03a6f1410 nextcloud in; radicale+rclone out 2025-10-16 14:28:08 -03:00