This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / machines / neoprism / config.nix
6.5 kB 192 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 # realwallpaper generator 83 ../../2configs/realwallpaper.nix 84 85 # binaergewitter announce bot 86 # ../../2configs/bgt-bot 87 88 # paste + cyberlocker 89 ../../2configs/paste.nix 90 91 # opencrow matrix bot 92 ../../2configs/opencrow.nix 93 94 # document signing 95 ../../2configs/docuseal.nix 96 97 # kannix (kanban board) 98 ../../2configs/kannix.nix 99 100 # backups 101 ./backup.nix 102 103 # IPFS 104 ../../2configs/services/flix/ipfs.nix 105 106 # n2n supernode (n2n.lassul.us) 107 ../../2configs/n2n-supernode.nix 108 109 # pocket-id SSO IdP (id.lassul.us) 110 ../../2configs/pocket-id.nix 111 112 # covibe co-vibing dashboard (covibe.lassul.us) 113 ../../2configs/covibe.nix 114 115 # omnigent agent meta-harness (omni.lassul.us) 116 ../../2configs/omnigent.nix 117 118 # radicle public seed (radicle.lassul.us) 119 ../../2configs/radicle.nix 120 121 # self-hosted iroh relay (relay.lassul.us) 122 ../../2configs/iroh-relay 123 124 # signed remote command execution (root executor + fleet dashboard, 125 # sigexec.lassul.us) 126 ../../2configs/sigexec/executor.nix 127 ../../2configs/sigexec/dashboard.nix 128 ]; 129 130 # lassul.us shouldn't be the default vhost here (nginx.nix already sets one) 131 services.nginx.virtualHosts."lassul.us" = { 132 default = lib.mkForce false; 133 locations = { 134 "= /wallpaper-marker.png".extraConfig = '' 135 alias /var/realwallpaper/realwallpaper-marker.png; 136 ''; 137 "= /wallpaper.png".extraConfig = '' 138 alias /var/realwallpaper/realwallpaper.png; 139 ''; 140 "= /wallpaper-stars-berlin.png".extraConfig = '' 141 alias /var/realwallpaper/realwallpaper-krebs-stars-berlin.png; 142 ''; 143 }; 144 }; 145 146 # riot VM (HFOS): fresh libvirt guest on a dedicated bridged public IP. 147 # Bridged onto ext-br with its own Hetzner MAC, so libvirt manages no 148 # iptables for it -> no nat-chain race, no restart-iptables hack (cf. hfos.nix). 149 virtualisation.libvirtd.enable = true; 150 security.polkit.enable = true; 151 users.users.riot = { 152 isNormalUser = true; 153 extraGroups = [ "libvirtd" ]; 154 openssh.authorizedKeys.keys = [ 155 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCwcI8EKqUwYVd4IlnTTaNY3qVMDe2M1sVPMdWaTJ8FnAXixBcZozFHyJ9bvGn6c/vFGBEACZk6QCxC2+sTxbaodCOUIyhAtxqAGO7jINmGrVWjg2NW8qBi+e+ekr2+jlhizxgMPgMcbawuazpMzrozi6sfJfRelJRqe6TxrK/SBO+V5pf8v2ubAfHHF6bJrqAykC247d2NmsHEyM/nGOOb2AlJx2vrK1FbFWr2fBAvnhJww9wqrfDYSM6+oRF/vrYKkT9cU8yjtCkyaJZTqRufF2pzc9a0X3Z4LHEIUykAl2aVmi5Wzh8CZj3qCeVb9Ju0ZGQIa5pvG5CbH5SUJOr9y6zhTx1xbqL+JYGkJqgHPMOCFiNIvWnFaNlnvFf4C9KcTf/VMOEvNdDklpjoWm+ptuQIciAhWKuUHd/6MqaRjmlvUqjl49EkRvYOGn9vasKt66MYrtfvbZ3tcqh5w9EEKhrcygiUXhIJzhu2s1BseAVRLjCsQ24BNbzrYiCO+vuk8/hdeHB1rP6Sas2v7jvYb3zQd647OTq+HrZWN8aCjCs5h8Y0QxrQzsLru0zKDRaNDlbSshNBAw7PzSXQAf9fISH7v6sC4nstf5jk+87ua/7xjWG4NYp5Y9FMFCsuE3XVmUCAbauq18RmN6V4s2TxCEs9bxONO0Vba4zwPnvMlw== cardno:000619250765" 156 ]; 157 }; 158 # the only forwarding the VM needs: accept traffic to/from its public IP. 159 krebs.iptables.tables.filter.FORWARD.rules = lib.mkBefore [ 160 { 161 v6 = false; 162 predicate = "--destination 95.217.192.52"; 163 target = "ACCEPT"; 164 } 165 { 166 v6 = false; 167 predicate = "--source 95.217.192.52"; 168 target = "ACCEPT"; 169 } 170 ]; 171 172 # tank/radicle (radicle seed storage) is created by disko at install; on an 173 # already-provisioned host it must be created before deploying: 174 # zfs create -o mountpoint=/var/lib/radicle -o quota=80G tank/radicle 175 # nofail keeps a missing dataset from failing local-fs.target -> emergency 176 # mode (which has no network and bricks the box). 177 fileSystems."/var/lib/radicle".options = [ "nofail" ]; 178 179 # Fleet-wide safety net: this box is headless (Hetzner, console only via 180 # KVM), so a failed critical target must never strand us at the emergency 181 # shell. With emergency mode disabled systemd keeps booting instead of 182 # dropping to a console -> network + sshd still come up, so a bad deploy 183 # (e.g. a missing dataset, as happened once) leaves the box reachable to 184 # fix and redeploy rather than bricked. Mirrors nixpkgs' headless profile. 185 # Note: we intentionally do NOT auto-roll-back to the previous generation; 186 # our config is pulled from git by system.autoUpgrade, so a rollback would 187 # just re-pull the same broken config on the next run (a rollback loop). 188 systemd.enableEmergencyMode = false; 189 190 krebs.build.host = config.krebs.hosts.neoprism; 191 system.stateVersion = "24.05"; 192}