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