summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2026-01-03 23:14:05 +0100
committerRutherther <rutherther@ditigal.xyz>2026-01-14 09:17:35 +0100
commit9448ec6fb20a737a852e8624b5611950886feaaa (patch)
tree02bdcad59844d7228d4cb2b3d2d8b12617d9bab6
parent94f9177cf812971406b48c2c2ecf3f6927373378 (diff)
install: Add guix-system-installer executable to system profile.
To allow users in headless consoles to use the graphical installer, add an executable. This executable is referred to by the console motd, so users in headless setups will get to know about it. * gnu/system/install.scm (installer-command-package): New variable. (%installation-services): Use it, add it to the profile-service-type Change-Id: Id2d07b3f190aa17c99c7667c3bb31ae696499dde Signed-off-by: Rutherther <rutherther@ditigal.xyz> Merges: #5346
-rw-r--r--gnu/system/install.scm37
1 files changed, 35 insertions, 2 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 1e30e33f7a5..b98b3ee601a 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -25,9 +25,11 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu system install)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu)
#:use-module (gnu system)
#:use-module (gnu system privilege)
+ #:use-module (guix build-system trivial)
#:use-module (gnu bootloader)
#:use-module (gnu bootloader u-boot)
#:use-module (guix gexp)
@@ -413,6 +415,27 @@ or by starting the installer, using `guix-system-installer` command.
#$(file-append shadow "/bin/login")
(command-line)))))
+(define* (installer-command-package installer-program
+ #:key executable)
+ (package
+ (name executable)
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list #:builder (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (mkdir-p (string-append #$output "/bin"))
+
+ (symlink #$installer-program
+ (string-append #$output "/bin/" #$executable))))))
+ (home-page #f)
+ (synopsis "Provides the Guix System installer as run-guix-installer command")
+ (description "Provides the Guix System installer as run-guix-installer command.")
+ (license license:gpl3+)))
+
(define* (%installation-services
#:key
(system (or (and=>
@@ -430,6 +453,10 @@ or by starting the installer, using `guix-system-installer` command.
(define bare-bones-os
(load "examples/bare-bones.tmpl"))
+ (define installer
+ (installer-program
+ #:guix-for-installer guix-for-system))
+
(append
;; Generic services
(list (service virtual-terminal-service-type)
@@ -437,8 +464,7 @@ or by starting the installer, using `guix-system-installer` command.
(service kmscon-service-type
(kmscon-configuration
(virtual-terminal "tty1")
- (login-program (installer-program
- #:guix-for-installer guix-for-system))))
+ (login-program installer)))
(simple-service 'installer-login
pam-root-service-type
@@ -465,6 +491,13 @@ or by starting the installer, using `guix-system-installer` command.
;; network. It can be faster than fetching from remote servers.
(service avahi-service-type)
+ ;; Allow runninng the installer command on headless setups.
+ (simple-service 'installer-program-profile
+ profile-service-type
+ (list (installer-command-package
+ installer
+ #:executable "guix-system-installer")))
+
;; The build daemon.
(service guix-service-type
(guix-configuration