aboutsummaryrefslogtreecommitdiff
path: root/tw/system
diff options
context:
space:
mode:
authorTimo Wilken2023-01-19 00:29:34 +0100
committerTimo Wilken2023-01-19 00:29:34 +0100
commitb2d069787257502d2a9a50c67ed79ad78438ad17 (patch)
treee98709a04536b54f0ac04cab28d5bea284c8d961 /tw/system
parent4a0a4f55981287ec7e69e2c4ff779f88c8a8b3b1 (diff)
Add nonfree installer image
Use the following command to write this image to disk: dd if=$(guix system image -t efi-raw tw/system/nonfree-installer.scm) \ of=/dev/sdX bs=64k oflag=sync status=progress
Diffstat (limited to 'tw/system')
-rw-r--r--tw/system/nonfree-installer.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/tw/system/nonfree-installer.scm b/tw/system/nonfree-installer.scm
new file mode 100644
index 00000000..bc363e95
--- /dev/null
+++ b/tw/system/nonfree-installer.scm
@@ -0,0 +1,36 @@
+(define-module (tw system nonfree-installer)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages package-management)
+ #:use-module (gnu services)
+ #:use-module (gnu services ssh)
+ #:use-module (gnu system)
+ #:use-module ((guix gexp) #:select (local-file))
+ #:use-module ((nongnu system install)
+ #:select (installation-os-nonfree))
+ #:use-module ((srfi srfi-26) #:select (cut)))
+
+(operating-system
+ (inherit installation-os-nonfree)
+ (packages
+ (cons* efibootmgr htop guix
+ (operating-system-packages installation-os-nonfree)))
+ (services
+ (cons*
+ ;; Add an SSH server to facilitate remote installs.
+ (service openssh-service-type
+ (openssh-configuration
+ (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"))))))
+ ;; Make sure to remove the SSH service from the base services,
+ ;; so we can override it fully.
+ (filter
+ (compose not (cut eq? openssh-service-type <>) service-kind)
+ ((@@ (gnu system install) %installation-services))))))