--- /dev/null
+(public-key
+ (ecc
+ (curve Ed25519)
+ (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)
+ )
+ )
--- /dev/null
+;; Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; substitutes.scm - nonguix substitute server for the daemon.
+
+(define-module (conf common substitutes)
+ #:use-module (gnu services base)
+ #:use-module (guix gexp)
+ #:export (augment-guix-configuration))
+
+(define (augment-guix-configuration config)
+ (let* ((substitute-url "https://substitutes.nonguix.org")
+ (signing-key (local-file "nonguix-signing-key.pub"))
+ (config-urls (guix-configuration-substitute-urls config))
+ (config-keys (guix-configuration-authorized-keys config))
+ (urls (append config-urls
+ (list substitute-url)))
+ (keys (append config-keys
+ (list signing-key))))
+ (guix-configuration (inherit config)
+ (substitute-urls urls)
+ (authorized-keys keys))))
;; PROFILE=nonfree — allows non-free firmware.
;; PROFILE=libre — free software only.
-(use-modules (conf system bluetooth)
+(use-modules (conf common substitutes)
+ (conf system bluetooth)
(conf system desktop)
(conf system volume)
(gnu)
dwm-desktop-packages %base-packages))
(services
- (append (list bluez-service %resolv-conf-service keyboard-layout-service)
- %custom-desktop-services))))
+ (modify-services (append (list bluez-service %resolv-conf-service
+ keyboard-layout-service)
+ %custom-desktop-services)
+ (guix-service-type config =>
+ (case profile
+ ((nonfree)
+ (augment-guix-configuration config))
+ ((libre)
+ config)))))))
(openssh-service-type config =>
(authorize-login config)))))
+(define %nonguix-signing-key
+ "C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98")
+
+(define %nonguix-acl-test
+ `(begin
+ (use-modules (ice-9 string-fun)
+ (ice-9 textual-ports))
+ (call-with-input-file "/etc/guix/acl"
+ (lambda (port)
+ (string-contains (get-string-all port)
+ ,%nonguix-signing-key)))))
+
(define (daemons-test-cases marionette)
#~(begin
(test-assert "services: resolv.conf is installed"
(and (wait-for-tcp-port 53
#$marionette)
(marionette-eval '(start-service 'ntpd)
- #$marionette)))))
+ #$marionette)))
+ (test-assert "services: nonguix substitutes are authorized"
+ (marionette-eval '#$%nonguix-acl-test
+ #$marionette))))
(define %vps-test-os
(marionette-operating-system (operating-system
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (nongnu packages linux)
+ #:use-module (conf common substitutes)
#:use-module (conf vps sshd)
#:use-module (conf vps dnscrypt)
#:use-module (conf vps nginx)
(use-service-modules networking shepherd)
+(define %vps-base-services
+ (append (list
+ ;; DHCP — OVH delivers the static IP via DHCP
+ (service dhcpcd-service-type)
+
+ %ssh-service
+
+ ;; NTP — correct time is required for Guix substitutes
+ (service ntp-service-type)
+
+ ;; dnscrypt-proxy — encrypted DNS proxy
+ (simple-service 'dnscrypt-proxy-daemon shepherd-root-service-type
+ (list dnscrypt-proxy-shepherd-service))
+
+ ;; Point system resolver to localhost.
+ ;; Uses a dedicated service type that extends
+ ;; etc-service-type rather than being one.
+ (service resolv-conf-service-type)
+
+ %nginx-service
+
+ ;; TODO: DNS-over-TLS on port 853.
+ ;; See server.git dnscrypt-proxy.conf and metadata.git.
+ ) %base-services))
+
(define vps-operating-system
(operating-system
(host-name "vps")
;; Services
(services
- (append (list
- ;; DHCP — OVH delivers the static IP via DHCP
- (service dhcpcd-service-type)
-
- %ssh-service
-
- ;; NTP — correct time is required for Guix substitutes
- (service ntp-service-type)
-
- ;; dnscrypt-proxy — encrypted DNS proxy
- (simple-service 'dnscrypt-proxy-daemon
- shepherd-root-service-type
- (list dnscrypt-proxy-shepherd-service))
-
- ;; Point system resolver to localhost.
- ;; Uses a dedicated service type that extends
- ;; etc-service-type rather than being one.
- (service resolv-conf-service-type)
-
- %nginx-service
-
- ;; TODO: nginx stream for DNS-over-TLS on port 853.
- ;; See server.git dnscrypt-proxy/dnscrypt-proxy.conf
- ;; and the metadata.git Ansible playbook for the
- ;; envsubst-based deployment pattern (SSL certs needed).
- ) %base-services))
+ (modify-services %vps-base-services
+ (guix-service-type config =>
+ (augment-guix-configuration config))))
;; Sudoers: dak can reconfigure without a password