guixsd-config

GuixSD configs for my systems
Log | Files | Refs

commit 30e20bb07a71091dca77b23acf0f9c6a03b2108c
parent e52a23d23a371a2d4df25167098d8200984e0f73
Author: vin <git@vineetk.net>
Date:   Tue, 14 Apr 2026 11:52:16 -0400

reindent files

Diffstat:
Mepistemia/packages/emacs.scm | 4++--
Mepistemia/packages/firmware.scm | 20++++++++++----------
Mepistemia/packages/xorg.scm | 120++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mepistemia/services/age-secret.scm | 10+++++-----
Mepistemia/systems/demiurge.scm | 42+++++++++++++++++++++---------------------
Mepistemia/systems/hastur.scm | 226++++++++++++++++++++++++++++++++++++++++----------------------------------------
6 files changed, 211 insertions(+), 211 deletions(-)

diff --git a/epistemia/packages/emacs.scm b/epistemia/packages/emacs.scm @@ -15,8 +15,8 @@ (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ogdenwebb/emacs-kaolin-themes") - (commit (string-append "v" version)))) + (url "https://github.com/ogdenwebb/emacs-kaolin-themes") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1lbqvs2jqvs6x8gj7bali24mw2fl6gk184zln6avy6wmam7n8dqi")))) diff --git a/epistemia/packages/firmware.scm b/epistemia/packages/firmware.scm @@ -12,10 +12,10 @@ ;; originally from guix upstream, but it's old and only for avr (define* (make-qmk-firmware-rp2040 keyboard keymap - #:key (description "") - keymap-json - keymap-source-directory - keyboard-source-directory) + #:key (description "") + keymap-json + keymap-source-directory + keyboard-source-directory) "Return a package to build the QMK firmware for KEYBOARD with KEYMAP. Keyboard should be the name of a sub-directory under the @file{keyboards} directory. For custom keymaps, KEYMAP-JSON, a file-like object of a JSON representation of @@ -34,8 +34,8 @@ keyboard definition in KEYBOARD-SOURCE-DIRECTORY." (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/qmk/qmk_firmware") - (commit version))) + (url "https://github.com/qmk/qmk_firmware") + (commit version))) (file-name (git-file-name "qmk-firmware" version)) (sha256 (base32 @@ -72,8 +72,8 @@ keyboard definition in KEYBOARD-SOURCE-DIRECTORY." (origin (method git-fetch) (uri (git-reference - (url "https://github.com/qmk/chibios") - (commit commit))) + (url "https://github.com/qmk/chibios") + (commit commit))) (file-name (git-file-name "chibios" commit)) (sha256 (base32 @@ -137,10 +137,10 @@ staggered keys and 3 thumb keys.")) (define-public qmk-ferris-sweep (make-qmk-firmware-rp2040 "ferris/sweep" "default" #:description - "The default keymap for the Ferris Sweep keyboard, a version of the + "The default keymap for the Ferris Sweep keyboard, a version of the Ferris 3x5+2 split keyboard with a daughterboard for MCU.")) (define-public qmk-ploopy-adept (make-qmk-firmware-rp2040 "ploopyco/madromys" "default" #:description - "The default keymap for the Ploopy Adept open-hardware programmable + "The default keymap for the Ploopy Adept open-hardware programmable trackball mouse.")) diff --git a/epistemia/packages/xorg.scm b/epistemia/packages/xorg.scm @@ -7,63 +7,63 @@ (define-public xorg-server-with-drivers (package - (inherit xorg-server) - (name "xorg-server-with-drivers") - (arguments - (substitute-keyword-arguments (package-arguments xorg-server) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'install 'install-modules-conf - (lambda _ - ;; Add Xorg module paths so drivers in inputs are found. - (call-with-output-file - (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") - (lambda (port) - (display - (string-append - "Section \"Files\"\nModulePath \"" - #$output "/lib/xorg/modules," - #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," - #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules," - #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" - "EndSection\n") - port))) - (call-with-output-file - (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") - (lambda (port) - (display - (string-append - "Section \"InputClass\"\n" - " Identifier \"keyboards\"\n" - " MatchIsKeyboard \"on\"\n" - " Driver \"libinput\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"mice\"\n" - " MatchIsPointer \"on\"\n" - " Driver \"libinput\"\n" - " Option \"AccelProfile\" \"flat\"\n" - " Option \"AccelSpeed\" \"0\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"touchpads\"\n" - " MatchIsTouchpad \"on\"\n" - " Driver \"libinput\"\n" - " Option \"AccelProfile\" \"flat\"\n" - " Option \"AccelSpeed\" \"0\"\n" - " Option \"Tapping\" \"on\"\n" - " Option \"TappingButtonMap\" \"lrm\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"wacom\"\n" - " MatchProduct \"Wacom\"\n" - " Driver \"wacom\"\n" - "EndSection\n") - port))))))))) - (inputs (modify-inputs (package-inputs xorg-server) - (append xf86-input-libinput - xf86-input-wacom - xf86-video-amdgpu))))) + (inherit xorg-server) + (name "xorg-server-with-drivers") + (arguments + (substitute-keyword-arguments (package-arguments xorg-server) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'install 'install-modules-conf + (lambda _ + ;; Add Xorg module paths so drivers in inputs are found. + (call-with-output-file + (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") + (lambda (port) + (display + (string-append + "Section \"Files\"\nModulePath \"" + #$output "/lib/xorg/modules," + #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," + #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules," + #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" + "EndSection\n") + port))) + (call-with-output-file + (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") + (lambda (port) + (display + (string-append + "Section \"InputClass\"\n" + " Identifier \"keyboards\"\n" + " MatchIsKeyboard \"on\"\n" + " Driver \"libinput\"\n" + "EndSection\n" + "\n" + "Section \"InputClass\"\n" + " Identifier \"mice\"\n" + " MatchIsPointer \"on\"\n" + " Driver \"libinput\"\n" + " Option \"AccelProfile\" \"flat\"\n" + " Option \"AccelSpeed\" \"0\"\n" + "EndSection\n" + "\n" + "Section \"InputClass\"\n" + " Identifier \"touchpads\"\n" + " MatchIsTouchpad \"on\"\n" + " Driver \"libinput\"\n" + " Option \"AccelProfile\" \"flat\"\n" + " Option \"AccelSpeed\" \"0\"\n" + " Option \"Tapping\" \"on\"\n" + " Option \"TappingButtonMap\" \"lrm\"\n" + "EndSection\n" + "\n" + "Section \"InputClass\"\n" + " Identifier \"wacom\"\n" + " MatchProduct \"Wacom\"\n" + " Driver \"wacom\"\n" + "EndSection\n") + port))))))))) + (inputs (modify-inputs (package-inputs xorg-server) + (append xf86-input-libinput + xf86-input-wacom + xf86-video-amdgpu))))) diff --git a/epistemia/services/age-secret.scm b/epistemia/services/age-secret.scm @@ -78,11 +78,11 @@ (define (age-secret-shepherd-service config) (list (shepherd-service - (provision '(age-secret)) - (requirement '()) - (one-shot? #t) - (start #~(lambda () #t)) - (documentation "Age secret decryption marker service.")))) + (provision '(age-secret)) + (requirement '()) + (one-shot? #t) + (start #~(lambda () #t)) + (documentation "Age secret decryption marker service.")))) (define age-secret-service-type (service-type diff --git a/epistemia/systems/demiurge.scm b/epistemia/systems/demiurge.scm @@ -49,9 +49,9 @@ ;; upstream guix updates slowly (define update-llama-cpp (options->transformation - '((without-tests . "llama-cpp") - (with-commit . "ggml=v0.9.10") - (with-commit . "llama-cpp=b8611")))) + '((without-tests . "llama-cpp") + (with-commit . "ggml=v0.9.10") + (with-commit . "llama-cpp=b8611")))) (operating-system (inherit base-system) @@ -334,25 +334,25 @@ rpz: (containers (list (oci-container-configuration - (image "llm") - (user "vin") - (ports '(("8080" . "8080"))) - (volumes '("/data/models:/app/models")) - (extra-arguments - '("--privileged" - "--cap-add=CAP_SYS_ADMIN" - "--cap-add=SYS_PTRACE" - "--device=/dev/kfd" - "--device=/dev/dri" - "--device=/dev/mem" - "--security-opt" "seccomp=unconfined"))) + (image "llm") + (user "vin") + (ports '(("8080" . "8080"))) + (volumes '("/data/models:/app/models")) + (extra-arguments + '("--privileged" + "--cap-add=CAP_SYS_ADMIN" + "--cap-add=SYS_PTRACE" + "--device=/dev/kfd" + "--device=/dev/dri" + "--device=/dev/mem" + "--security-opt" "seccomp=unconfined"))) (oci-container-configuration - (image "deluan/navidrome:latest") - (user "vin") - (ports '(("4533" . "4533"))) - (environment '("ND_ENABLEINSIGHTCOLLECTOR=false")) - (volumes '("data:/data" - "/data_hdd/music:/music:ro")))))))) + (image "deluan/navidrome:latest") + (user "vin") + (ports '(("4533" . "4533"))) + (environment '("ND_ENABLEINSIGHTCOLLECTOR=false")) + (volumes '("data:/data" + "/data_hdd/music:/music:ro")))))))) %base-services) (sysctl-service-type config => (sysctl-configuration diff --git a/epistemia/systems/hastur.scm b/epistemia/systems/hastur.scm @@ -98,49 +98,49 @@ %base-packages)) (services (modify-services (append (list (service age-secret-service-type - (age-secret-configuration - (secrets (list - (age-secret - (name "wpa_supplicant") - (file (local-file "../secrets/wpa_supplicant.age"))) - (age-secret - (name "wg0_hastur") - (file (local-file "../secrets/wg0_hastur.age"))) - (age-secret - (name "wg1_hastur") - (file (local-file "../secrets/wg1_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)) - (service seatd-service-type) - (service iptables-service-type) - (service unbound-service-type - (unbound-configuration - (server - (unbound-server - (interface '("127.0.0.1" - "::1" - "10.0.13.2")) - (hide-version #t) - (hide-identity #t) - (extra-options '((ip-freebind . yes) - (aggressive-nsec . no) - (module-config . "respip validator iterator"))))) - (forward-zone - (list - (unbound-zone - (name ".") - (forward-addr '("9.9.9.9"))) - (unbound-zone - (name "epistemia.") - (forward-addr '("10.0.13.2"))))) - (extra-content "\ + (age-secret-configuration + (secrets (list + (age-secret + (name "wpa_supplicant") + (file (local-file "../secrets/wpa_supplicant.age"))) + (age-secret + (name "wg0_hastur") + (file (local-file "../secrets/wg0_hastur.age"))) + (age-secret + (name "wg1_hastur") + (file (local-file "../secrets/wg1_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)) + (service seatd-service-type) + (service iptables-service-type) + (service unbound-service-type + (unbound-configuration + (server + (unbound-server + (interface '("127.0.0.1" + "::1" + "10.0.13.2")) + (hide-version #t) + (hide-identity #t) + (extra-options '((ip-freebind . yes) + (aggressive-nsec . no) + (module-config . "respip validator iterator"))))) + (forward-zone + (list + (unbound-zone + (name ".") + (forward-addr '("9.9.9.9"))) + (unbound-zone + (name "epistemia.") + (forward-addr '("10.0.13.2"))))) + (extra-content "\ server: access-control: 127.0.0.0/8 allow access-control: 10.0.13.0/24 allow @@ -149,78 +149,78 @@ server: rpz: name: hagezi.ultimate url: https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/rpz/ultimate.txt\n"))) - (service dhcpcd-service-type - (dhcpcd-configuration - (option '("rapid_commit" "interface_mtu")) - (no-option '("nd_rdnss" - "dhcp6_name_servers" - "domain_name_servers" - "domain_name" - "domain_search")) - (static '("domain_name_servers=127.0.0.1" - "domain_search=epistemia")) - (no-hook '("hostname")))) - (service wpa-supplicant-service-type - (wpa-supplicant-configuration - (shepherd-requirement '(age-secret kernel-module-loader)) - (wpa-supplicant wpa-supplicant-minimal) - (dbus? #f) - (interface "wlan0") - (config-file "/run/secrets/wpa_supplicant"))) - (service openssh-service-type - (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 '("10.68.117.111/32" "fc00:bbbb:bbbb:bb01::5:756e/128")) - (port 51821) - (bootstrap-private-key? #f) - (shepherd-requirement '(age-secret networking)) - (private-key "/run/secrets/wg0_hastur") - (pre-up '("while [ ! -f /run/secrets/wg0_hastur ]; do sleep 1; done" - "ip route add 185.204.1.219 via $(ip route show default | cut -d' ' -f3) dev wlan0")) - (post-down '("ip route del 185.204.1.219")) - (peers - (list - (wireguard-peer - (name "mullvad-fi-hel-wg-003") - (public-key "FKodo9V6BehkNphL+neI0g4/G/cjbZyYhoptSWf3Si4=") - (allowed-ips '("0.0.0.0/0" "::0/0")) - (endpoint "185.204.1.219:51820")))))) - (service wireguard-service-type - (wireguard-configuration - (interface "wg1") - (addresses '("10.0.13.3/24" "fd00:b0ba:cafe:babe::3/64 ")) - (port 51820) - (bootstrap-private-key? #f) - (private-key "/run/secrets/wg1_hastur") - (table #f) - (shepherd-requirement '(age-secret networking unbound)) - (pre-up '("while [ ! -f /run/secrets/wg1_hastur ]; do sleep 1; done")) - (peers - (list - (wireguard-peer - (name "saklas.epistemia") - (public-key "XvRailvccuc7LJIF4aaYM/MLkU4upiprwFlCfBllhl0=") - (allowed-ips '("10.0.13.1/32" "fd00:b0ba:cafe:babe::1/128")) - (endpoint "162.55.242.220:51820") - (keep-alive 25)) - (wireguard-peer - (name "demiurge.epistemia") - (public-key "FMLvbSxY6vA8CRV4S1vl4+pMeCr/kR9n0G5w9buNqh4=") - (allowed-ips '("10.0.13.2/32" "fd00:b0ba:cafe:babe::2/128")) - (endpoint "carcosa.13f0.net:51820") - (keep-alive 25)))))) - (service pam-limits-service-type - (list (pam-limits-entry "@audio" 'both 'rtprio 99) - (pam-limits-entry "@audio" 'both 'memlock 'unlimited))) - (service tlp-service-type)) + (service dhcpcd-service-type + (dhcpcd-configuration + (option '("rapid_commit" "interface_mtu")) + (no-option '("nd_rdnss" + "dhcp6_name_servers" + "domain_name_servers" + "domain_name" + "domain_search")) + (static '("domain_name_servers=127.0.0.1" + "domain_search=epistemia")) + (no-hook '("hostname")))) + (service wpa-supplicant-service-type + (wpa-supplicant-configuration + (shepherd-requirement '(age-secret kernel-module-loader)) + (wpa-supplicant wpa-supplicant-minimal) + (dbus? #f) + (interface "wlan0") + (config-file "/run/secrets/wpa_supplicant"))) (service bluetooth-service-type) + (service openssh-service-type + (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 '("10.68.117.111/32" "fc00:bbbb:bbbb:bb01::5:756e/128")) + (port 51821) + (bootstrap-private-key? #f) + (shepherd-requirement '(age-secret networking)) + (private-key "/run/secrets/wg0_hastur") + (pre-up '("while [ ! -f /run/secrets/wg0_hastur ]; do sleep 1; done" + "ip route add 185.204.1.219 via $(ip route show default | cut -d' ' -f3) dev wlan0")) + (post-down '("ip route del 185.204.1.219")) + (peers + (list + (wireguard-peer + (name "mullvad-fi-hel-wg-003") + (public-key "FKodo9V6BehkNphL+neI0g4/G/cjbZyYhoptSWf3Si4=") + (allowed-ips '("0.0.0.0/0" "::0/0")) + (endpoint "185.204.1.219:51820")))))) + (service wireguard-service-type + (wireguard-configuration + (interface "wg1") + (addresses '("10.0.13.3/24" "fd00:b0ba:cafe:babe::3/64 ")) + (port 51820) + (bootstrap-private-key? #f) + (private-key "/run/secrets/wg1_hastur") + (table #f) + (shepherd-requirement '(age-secret networking unbound)) + (pre-up '("while [ ! -f /run/secrets/wg1_hastur ]; do sleep 1; done")) + (peers + (list + (wireguard-peer + (name "saklas.epistemia") + (public-key "XvRailvccuc7LJIF4aaYM/MLkU4upiprwFlCfBllhl0=") + (allowed-ips '("10.0.13.1/32" "fd00:b0ba:cafe:babe::1/128")) + (endpoint "162.55.242.220:51820") + (keep-alive 25)) + (wireguard-peer + (name "demiurge.epistemia") + (public-key "FMLvbSxY6vA8CRV4S1vl4+pMeCr/kR9n0G5w9buNqh4=") + (allowed-ips '("10.0.13.2/32" "fd00:b0ba:cafe:babe::2/128")) + (endpoint "carcosa.13f0.net:51820") + (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)) %base-services) (sysctl-service-type config => (sysctl-configuration