guixsd-config

GuixSD configs for my systems
Log | Files | Refs

commit 4381c27d0654e52ef1b534eb527ac741eded3e71
parent 544ab93a085dee02cfddfd0dfbe8fe400844efb7
Author: Vineet Kumar <git@vineetk.net>
Date:   Thu, 19 Nov 2026 12:38:00 +0100

hastur: update config to match demiurge

Diffstat:
Mepistemia/systems/hastur.scm | 211+++++++++++++++++++++++++++++++++++--------------------------------------------
1 file changed, 94 insertions(+), 117 deletions(-)

diff --git a/epistemia/systems/hastur.scm b/epistemia/systems/hastur.scm @@ -26,11 +26,11 @@ #:use-module (nongnu packages linux) #:use-module (nongnu system linux-initrd) #:use-module (epistemia bootloader) + #:use-module (epistemia packages vpn) #:use-module (epistemia systems base-system) #:use-module (epistemia systems linux-initrd) #:use-module (epistemia services age-secret) - #:use-module (epistemia services zfs) - #:use-module (epistemia packages zfs)) + #:use-module (epistemia services vpn)) (operating-system (inherit base-system) @@ -44,62 +44,47 @@ (supplementary-groups '("wheel" "audio" "video" "input" "seat" "tty" "kvm"))) %base-user-accounts)) - (kernel linux-6.18) + (kernel linux-7.2) (kernel-arguments (list "net.ifnames=0" "modprobe.blacklist=snd_hda_intel")) - (kernel-loadable-modules (list (list zfs-linux "module"))) + (kernel-loadable-modules (list amneziawg-linux-kernel-module-linux)) - (initrd (lambda (file-systems . args) - (apply microcode-initrd file-systems - #:initrd epistemia-zfs-initrd - #:zfs-package zfs-linux - args))) + (initrd microcode-initrd) (firmware (cons* i915-firmware iwlwifi-firmware %base-firmware)) + (keyboard-layout (keyboard-layout "us" "workman")) + (bootloader (bootloader-configuration - (bootloader grub-zfs) - (targets '("/boot/efi")))) + (bootloader grub-efi-bootloader) + (targets '("/boot/efi")) + (keyboard-layout keyboard-layout))) + + (mapped-devices + (list (mapped-device + (source (uuid "3f4ebbf2-6275-4912-a563-1b31a9bdd031")) + (target "root") + (type luks-device-mapping)))) (file-systems (append (list (file-system - (device "zroot/root") - (mount-point "/") - (type "zfs") - (check? #f) - (needed-for-boot? #t)) - (file-system - (device "zroot/gnu") - (mount-point "/gnu") - (type "zfs") - (check? #f) - (needed-for-boot? #t)) - (file-system - (device "zroot/var") - (mount-point "/var") - (type "zfs") - (check? #f) - (needed-for-boot? #t)) + (device (file-system-label "root")) + (mount-point "/") + (type "f2fs") + (dependencies mapped-devices)) (file-system - (device "zroot/home") - (mount-point "/home") - (type "zfs") - (check? #f) - (needed-for-boot? #t)) - (file-system - (device (uuid "85DD-DE6D" 'fat)) - (mount-point "/boot/efi") - (type "vfat")) + (device (uuid "66CE-2CB0" 'fat)) + (mount-point "/boot/efi") + (type "vfat")) (file-system - (device "none") - (mount-point "/home/vin/.local/state/runtime") - (type "tmpfs") - (options "uid=1000"))) + (device "none") + (mount-point "/home/vin/.local/state/runtime") + (type "tmpfs") + (options "uid=1000"))) %base-file-systems)) - (swap-devices (list (swap-space (target (uuid "a9f91237-58fe-452a-b4af-cbd281f5b8ce"))))) + (swap-devices (list (swap-space (target "/swapfile")))) (packages (append (list emacs-no-x - git - zfs-linux) + git) %base-packages)) (services (modify-services (append (list (service age-secret-service-type @@ -112,20 +97,11 @@ (name "wg0_hastur") (file (local-file "../secrets/wg0_hastur.age"))) (age-secret - (name "wg1_hastur") - (file (local-file "../secrets/wg1_hastur.age"))) + (name "awg0_hastur") + (file (local-file "../secrets/awg0_hastur.age"))) (age-secret - (name "wg2_hastur") - (file (local-file "../secrets/wg2_hastur.age"))))))) - (simple-service 'zfs-loader - kernel-module-loader-service-type - '("zfs")) - (simple-service 'zfs-shepherd-services - shepherd-root-service-type - zfs-shepherd-services) - (simple-service 'zfs-shepherd-services-user-processes - user-processes-service-type - '(zfs-automount)) + (name "awg0_header") + (file (local-file "../secrets/awg0_hastur_header.age"))))))) (service seatd-service-type) (service iptables-service-type) (service unbound-service-type @@ -140,11 +116,12 @@ (forward-zone (list (unbound-zone - (name ".") - (forward-addr '("10.0.13.1"))) + (name "epistemia.") + (forward-addr '("amneziawg +vineetk.net.1"))) (unbound-zone - (name "carcosa.13f0.net.") - (forward-addr '("9.9.9.9"))))))) + (name ".") + (forward-addr '("9.9.9.9"))))))) (service dhcpcd-service-type (dhcpcd-configuration (option '("rapid_commit" "interface_mtu")) @@ -158,7 +135,7 @@ (no-hook '("hostname")))) (service wpa-supplicant-service-type (wpa-supplicant-configuration - (shepherd-requirement '(age-secret kernel-module-loader)) + (shepherd-requirement '(age-secret)) (wpa-supplicant wpa-supplicant-minimal) (dbus? #f) (interface "wlan0") @@ -168,73 +145,73 @@ (openssh-configuration (permit-root-login #f) (authorized-keys - `(("vin" ,(local-file "/data/ssh/id_ed25519.pub")) - ("root" ,(local-file "/data/ssh/id_ed25519.pub")))))) - (service wireguard-service-type - (wireguard-configuration - (interface "wg0") - (addresses '("172.27.194.145/32" "fd00:0000:1337:cafe:1111:1111:9893:6822/128")) - (port 51821) - (bootstrap-private-key? #f) - (shepherd-requirement '(age-secret wpa-supplicant)) - (private-key "/run/secrets/wg0_hastur") - (pre-up '("while [ ! -f /run/secrets/wg0_hastur ]; do sleep 1; done" - "while [ -z \"$(ip route show default)\" ]; do sleep 1; done" - "ip route add 185.157.162.7 via $(ip route show default | cut -d' ' -f3) dev wlan0")) - (post-down '("ip route del 185.157.162.7")) - (peers - (list - (wireguard-peer - (name "ovpn-ams-29") - (public-key "wTlz3u1egzUrx4Ho02cL7Ht1BBa/C8bULzXStn5f+zk=") - (allowed-ips '("0.0.0.0/0" "::0/0")) - (endpoint "185.157.162.7:9929")))))) - (service wireguard-service-type - (wireguard-configuration - (interface "wg1") - (addresses '("10.0.13.3/24" "fd00:b0ba:cafe:babe::3/64")) + `(("vin" ,(plain-file "main-ssh-pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMcHRzXCGVZc0FnC986styK07XLLv0ILGeOzQMrWEXjy")) + ("root" ,(plain-file "main-ssh-pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMcHRzXCGVZc0FnC986styK07XLLv0ILGeOzQMrWEXjy")))))) + ;; (service wireguard-service-type + ;; (wireguard-configuration + ;; (interface "wg0") + ;; (addresses '("172.27.194.145/32" "fd00:0000:1337:cafe:1111:1111:9893:6822/128")) + ;; (port 51821) + ;; (bootstrap-private-key? #f) + ;; (shepherd-requirement '(age-secret wpa-supplicant)) + ;; (private-key "/run/secrets/wg0_hastur") + ;; (pre-up '("while [ ! -f /run/secrets/wg0_hastur ]; do sleep 1; done" + ;; "while [ -z \"$(ip route show default)\" ]; do sleep 1; done" + ;; "ip route add 185.157.162.7 via $(ip route show default | cut -d' ' -f3) dev wlan0")) + ;; (post-down '("ip route del 185.157.162.7")) + ;; (peers + ;; (list + ;; (wireguard-peer + ;; (name "ovpn-ams-29") + ;; (public-key "wTlz3u1egzUrx4Ho02cL7Ht1BBa/C8bULzXStn5f+zk=") + ;; (allowed-ips '("0.0.0.0/0" "::0/0")) + ;; (endpoint "185.157.162.7:9929")))))) + (service amneziawg-service-type + (amneziawg-configuration + (interface "awg0") + (addresses '("10.0.13.5/32")) (port 51820) (bootstrap-private-key? #f) - (private-key "/run/secrets/wg1_hastur") + (private-key "/run/secrets/awg0_hastur") + (header-protection-key "/run/secrets/awg0_header") (table #f) - (shepherd-requirement '(age-secret unbound wpa-supplicant)) - (pre-up '("while [ ! -f /run/secrets/wg1_hastur ]; do sleep 1; done" - "while [ -z \"$(ip route show default)\" ]; do sleep 1; done")) + (shepherd-requirement '(age-secret + ;; to prevent iptables lock issues + ;; wireguard-wg0 + )) + (pre-up '("while [ ! -f /run/secrets/awg0_hastur ]; do sleep 1; done" + "while [ ! -f /run/secrets/awg0_header ]; do sleep 1; done")) + + ;; amnezia + (h1 1) + (h2 2) + (h3 3) + (h4 4) + (s1 20) + (s2 20) + (s3 20) + (s4 20) + (content-padding-addition "16-64") + (peers (list - (wireguard-peer + (amneziawg-peer (name "saklas.epistemia") (public-key "XvRailvccuc7LJIF4aaYM/MLkU4upiprwFlCfBllhl0=") - (allowed-ips '("10.0.13.1/32" "fd00:b0ba:cafe:babe::1/128")) + (allowed-ips '("10.0.13.1/32")) (endpoint "141.95.52.111:51820") (keep-alive 25)) - (wireguard-peer + (amneziawg-peer (name "demiurge.epistemia") - (public-key "FMLvbSxY6vA8CRV4S1vl4+pMeCr/kR9n0G5w9buNqh4=") - (allowed-ips '("10.0.13.2/32" "fd00:b0ba:cafe:babe::2/128")) + (public-key "/C9c07KJwG6YrKxaPcRvUYv1u+xb16SQ0DwrGlTPgmQ=") + (allowed-ips '("10.0.13.2/32")) (endpoint "carcosa.13f0.net:51820") + (keep-alive 25)) + (amneziawg-peer + (name "pixel.epistemia") + (public-key "qj9S6SNMIldqrX2syhZ5+tGIRPgiCsMPRrS4h2/4cSA=") + (allowed-ips '("10.0.13.4/32")) (keep-alive 25)))))) - (service wireguard-service-type - (wireguard-configuration - (interface "wg2") - (addresses '("10.0.14.2/24")) - (port 51822) - (bootstrap-private-key? #f) - (private-key "/run/secrets/wg2_hastur") - (shepherd-requirement '(age-secret wpa-supplicant)) - (pre-up '("while [ ! -f /run/secrets/wg2_hastur ]; do sleep 1; done" - "while [ -z \"$(ip route show default)\" ]; do sleep 1; done")) - (peers - (list - (wireguard-peer - (name "abatur.epistemia") - (public-key "OOpc1K4S56FdJkCaqHx3DC4aIO+zQCAo8ACwCboLEjg=") - (allowed-ips '("10.0.14.1/32" "100.64.0.0/10")) - (endpoint "87.99.141.145:51822") - (keep-alive 25)))))) - (service pam-limits-service-type - (list (pam-limits-entry "@audio" 'both 'rtprio 99) - (pam-limits-entry "@audio" 'both 'memlock 'unlimited))) (service powertop-service-type) (service tlp-service-type) ;; needed by guix packages fetched over ssh (e.g. emacs-kasi)