This repository has no description
7.0 kB
210 lines
1{
2 self,
3 config,
4 lib,
5 ...
6}:
7
8{
9 imports = [
10 ../../configs
11 ../../configs/ssh-redirect.nix
12 ../../configs/retiolum.nix
13 ../../configs/mailserver.nix
14 ../../configs/snappymail.nix
15 ../../configs/gsm-wiki.nix
16 ../../configs/monitoring/telegraf.nix
17 ../../configs/pair-programming.nix
18 ../../configs/nginx.nix
19 ../../configs/rogue-talk.nix
20
21 ../../configs/services/matrix
22 ../../configs/services/matrix/proxy.nix
23 ../../configs/services/matrix/cinny.nix
24 ../../configs/services/matrix/bridges/mautrix-whatsapp.nix
25 ../../configs/services/matrix/bridges/mautrix-signal.nix
26 ../../configs/services/matrix/bridges/heisenbridge.nix
27 ../../configs/services/matrix/bridges/mautrix-telegram.nix
28 ../../configs/services/matrix/bridges/mautrix-discord.nix
29 ../../configs/services/matrix/bridges/matrix-zulip-bridge.nix
30
31 ../../configs/services/pad
32
33 ../../configs/hass/proxy.nix
34 ../../configs/hermes-proxy.nix
35
36 # sync-containers
37 ../../configs/consul.nix
38 ../../configs/services/flix/container-host.nix
39 ../../configs/services/radio/container-host.nix
40 ../../configs/orange-host.nix
41 ../../configs/hotdog-host.nix
42
43 # other containers
44 ../../configs/riot.nix
45
46 # proxying of services
47 ../../configs/services/radio/proxy.nix
48 ../../configs/services/flix/proxy.nix
49 ../../configs/services/coms/jitsi.nix
50 # mastodon (social.krebsco.de) -> hotdog container, migrated from prism
51 (self.inputs.stockholm + "/krebs/2configs/mastodon-proxy.nix")
52
53 # dns
54 ../../configs/dns/knot.nix
55
56 # url shortener
57 ../../configs/go.nix
58
59 # video strreaming
60 ../../configs/cast.nix
61
62 # c-base ollama tunnel
63 ../../configs/c-base-ai-tunnel.nix
64
65 # debug stuff
66 ../../configs/websites/mergebot.lassul.us.nix
67
68 # autoupdates
69 ../../configs/autoupdate.nix
70
71 # vaultwarden
72 ../../configs/vaultwarden.nix
73
74 # download user
75 ../../configs/download-user.nix
76
77 # caldav calendar
78 ../../configs/radicale.nix
79
80 # lassul.us website
81 ../../configs/websites/lassulus.nix
82
83 # where.is.lassul.us (location from home-assistant on a map)
84 ../../configs/websites/where.is.lassul.us
85
86 # realwallpaper generator
87 ../../configs/realwallpaper.nix
88
89 # binaergewitter announce bot
90 # ../../configs/bgt-bot
91
92 # paste + cyberlocker
93 ../../configs/paste.nix
94
95 # opencrow matrix bot
96 ../../configs/opencrow.nix
97
98 # document signing
99 ../../configs/docuseal.nix
100
101 # kannix (kanban board)
102 ../../configs/kannix.nix
103
104 # timeful availability polls (when.lassul.us)
105 ../../configs/timeful.nix
106
107 # backups
108 ./backup.nix
109
110 # IPFS
111 ../../configs/services/flix/ipfs.nix
112
113 # n2n supernode (n2n.lassul.us)
114 ../../configs/n2n-supernode.nix
115
116 # pocket-id SSO IdP (id.lassul.us)
117 ../../configs/pocket-id.nix
118
119 # covibe co-vibing dashboard (covibe.lassul.us)
120 ../../configs/covibe.nix
121
122 # omnigent agent meta-harness (omni.lassul.us)
123 ../../configs/omnigent.nix
124
125 # radicle public seed (radicle.lassul.us)
126 ../../configs/radicle.lassul.us.nix
127 # radicle identity + node for this machine (/var/lib/rad)
128 ../../configs/rad.nix
129
130 # herdr agent multiplexer
131 ../../configs/herdr.nix
132
133 # self-hosted iroh relay (relay.lassul.us)
134 ../../configs/iroh-relay
135
136 # signed remote command execution (root executor + fleet dashboard,
137 # sigexec.lassul.us)
138 ../../configs/sigexec/executor.nix
139 ../../configs/sigexec/dashboard.nix
140
141 # parley federated IRC-speaking chat (parley.lassul.us)
142 ../../configs/parley.nix
143
144 # nixpkgs PR triage dashboard (review.lassul.us)
145 ../../configs/nixpkgs-triage.nix
146 ];
147
148 # lassul.us shouldn't be the default vhost here (nginx.nix already sets one)
149 services.nginx.virtualHosts."lassul.us" = {
150 default = lib.mkForce false;
151 locations = {
152 "= /wallpaper-marker.png".extraConfig = ''
153 alias /var/realwallpaper/realwallpaper-marker.png;
154 '';
155 "= /wallpaper.png".extraConfig = ''
156 alias /var/realwallpaper/realwallpaper.png;
157 '';
158 "= /wallpaper-stars-berlin.png".extraConfig = ''
159 alias /var/realwallpaper/realwallpaper-krebs-stars-berlin.png;
160 '';
161 };
162 };
163
164 # riot VM (HFOS): fresh libvirt guest on a dedicated bridged public IP.
165 # Bridged onto ext-br with its own Hetzner MAC, so libvirt manages no
166 # iptables for it -> no nat-chain race, no restart-iptables hack (cf. hfos.nix).
167 virtualisation.libvirtd.enable = true;
168 security.polkit.enable = true;
169 users.users.riot = {
170 isNormalUser = true;
171 extraGroups = [ "libvirtd" ];
172 openssh.authorizedKeys.keys = [
173 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCwcI8EKqUwYVd4IlnTTaNY3qVMDe2M1sVPMdWaTJ8FnAXixBcZozFHyJ9bvGn6c/vFGBEACZk6QCxC2+sTxbaodCOUIyhAtxqAGO7jINmGrVWjg2NW8qBi+e+ekr2+jlhizxgMPgMcbawuazpMzrozi6sfJfRelJRqe6TxrK/SBO+V5pf8v2ubAfHHF6bJrqAykC247d2NmsHEyM/nGOOb2AlJx2vrK1FbFWr2fBAvnhJww9wqrfDYSM6+oRF/vrYKkT9cU8yjtCkyaJZTqRufF2pzc9a0X3Z4LHEIUykAl2aVmi5Wzh8CZj3qCeVb9Ju0ZGQIa5pvG5CbH5SUJOr9y6zhTx1xbqL+JYGkJqgHPMOCFiNIvWnFaNlnvFf4C9KcTf/VMOEvNdDklpjoWm+ptuQIciAhWKuUHd/6MqaRjmlvUqjl49EkRvYOGn9vasKt66MYrtfvbZ3tcqh5w9EEKhrcygiUXhIJzhu2s1BseAVRLjCsQ24BNbzrYiCO+vuk8/hdeHB1rP6Sas2v7jvYb3zQd647OTq+HrZWN8aCjCs5h8Y0QxrQzsLru0zKDRaNDlbSshNBAw7PzSXQAf9fISH7v6sC4nstf5jk+87ua/7xjWG4NYp5Y9FMFCsuE3XVmUCAbauq18RmN6V4s2TxCEs9bxONO0Vba4zwPnvMlw== cardno:000619250765"
174 ];
175 };
176 # the only forwarding the VM needs: accept traffic to/from its public IP.
177 krebs.iptables.tables.filter.FORWARD.rules = lib.mkBefore [
178 {
179 v6 = false;
180 predicate = "--destination 95.217.192.52";
181 target = "ACCEPT";
182 }
183 {
184 v6 = false;
185 predicate = "--source 95.217.192.52";
186 target = "ACCEPT";
187 }
188 ];
189
190 # tank/radicle (radicle seed storage) is created by disko at install; on an
191 # already-provisioned host it must be created before deploying:
192 # zfs create -o mountpoint=/var/lib/radicle -o quota=80G tank/radicle
193 # nofail keeps a missing dataset from failing local-fs.target -> emergency
194 # mode (which has no network and bricks the box).
195 fileSystems."/var/lib/radicle".options = [ "nofail" ];
196
197 # Fleet-wide safety net: this box is headless (Hetzner, console only via
198 # KVM), so a failed critical target must never strand us at the emergency
199 # shell. With emergency mode disabled systemd keeps booting instead of
200 # dropping to a console -> network + sshd still come up, so a bad deploy
201 # (e.g. a missing dataset, as happened once) leaves the box reachable to
202 # fix and redeploy rather than bricked. Mirrors nixpkgs' headless profile.
203 # Note: we intentionally do NOT auto-roll-back to the previous generation;
204 # our config is pulled from git by system.autoUpgrade, so a rollback would
205 # just re-pull the same broken config on the next run (a rollback loop).
206 systemd.enableEmergencyMode = false;
207
208 krebs.build.host = config.krebs.hosts.neoprism;
209 system.stateVersion = "24.05";
210}