From a56bdba05f21d75dc4b0fad74d3912c384d5c6c5 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 27 Mar 2024 17:03:29 -0500 Subject: Configure channels through guix-configuration In recent versions, it seems Guix silently overwrites any custom /etc/guix/channels.scm file, so configure channels though Guix' configuration. --- tw/system/installer/nonfree.scm | 48 +++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'tw/system/installer/nonfree.scm') diff --git a/tw/system/installer/nonfree.scm b/tw/system/installer/nonfree.scm index 14dffccb..97755076 100644 --- a/tw/system/installer/nonfree.scm +++ b/tw/system/installer/nonfree.scm @@ -7,6 +7,7 @@ #:use-module (gnu services base) #:use-module (gnu services ssh) #:use-module (gnu system) + #:use-module (guix channels) #:use-module (guix gexp) #:use-module ((nongnu packages linux) #:prefix nongnu:) ; don't interfere with (gnu packages linux) @@ -14,7 +15,6 @@ #:select (installation-os-nonfree)) #:use-module ((nongnu system linux-initrd) #:prefix nongnu:) - #:use-module ((srfi srfi-26) #:select (cut)) #:use-module (tw channels) #:use-module (tw packages firmware)) @@ -38,29 +38,25 @@ (operating-system-packages installation-os-nonfree))) (services - (cons* - ;; Add this channel, so we can install nonfree packages directly. - (extra-special-file "/etc/guix/channels.scm" - (scheme-file "channels.scm" %system-channels)) + (modify-services (append %system-channel-services ((@@ (gnu system install) %installation-services))) + ;; Set up an SSH server to facilitate remote installs. + (openssh-service-type + config => + (openssh-configuration + (inherit config) + (port-number 22) + (%auto-start? #t) + (permit-root-login #t) + ;; The root account is passwordless, so make sure + ;; a password is set before allowing logins. + (allow-empty-passwords? #f) + (password-authentication? #f) + (authorized-keys + `(("root" ,(local-file "../files/timo.pub")))))) - ;; Use nonguix' substitute server. - (simple-service 'nonguix guix-service-type - (guix-extension - (authorized-keys (list %nonguix-signing-key)) - (substitute-urls '("https://substitutes.nonguix.org")))) - - (modify-services ((@@ (gnu system install) %installation-services)) - ;; Set up an SSH server to facilitate remote installs. - (openssh-service-type - config => - (openssh-configuration - (inherit config) - (port-number 22) - (%auto-start? #t) - (permit-root-login #t) - ;; The root account is passwordless, so make sure - ;; a password is set before allowing logins. - (allow-empty-passwords? #f) - (password-authentication? #f) - (authorized-keys - `(("root" ,(local-file "../files/timo.pub")))))))))) + ;; Add this channel, so we can install nonfree packages directly. + (guix-service-type + config => + (guix-configuration + (inherit config) + (channels %system-channels)))))) -- cgit v1.2.3