summaryrefslogtreecommitdiff
path: root/gnu/system
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 /gnu/system
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
Diffstat (limited to 'gnu/system')
-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 @@
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. 25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 26
27(define-module (gnu system install) 27(define-module (gnu system install)
28 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (gnu) 29 #:use-module (gnu)
29 #:use-module (gnu system) 30 #:use-module (gnu system)
30 #:use-module (gnu system privilege) 31 #:use-module (gnu system privilege)
32 #:use-module (guix build-system trivial)
31 #:use-module (gnu bootloader) 33 #:use-module (gnu bootloader)
32 #:use-module (gnu bootloader u-boot) 34 #:use-module (gnu bootloader u-boot)
33 #:use-module (guix gexp) 35 #:use-module (guix gexp)
@@ -413,6 +415,27 @@ or by starting the installer, using `guix-system-installer` command.
413 #$(file-append shadow "/bin/login") 415 #$(file-append shadow "/bin/login")
414 (command-line))))) 416 (command-line)))))
415 417
418(define* (installer-command-package installer-program
419 #:key executable)
420 (package
421 (name executable)
422 (version "0")
423 (source #f)
424 (build-system trivial-build-system)
425 (arguments
426 (list #:builder (with-imported-modules '((guix build utils))
427 #~(begin
428 (use-modules (guix build utils))
429
430 (mkdir-p (string-append #$output "/bin"))
431
432 (symlink #$installer-program
433 (string-append #$output "/bin/" #$executable))))))
434 (home-page #f)
435 (synopsis "Provides the Guix System installer as run-guix-installer command")
436 (description "Provides the Guix System installer as run-guix-installer command.")
437 (license license:gpl3+)))
438
416(define* (%installation-services 439(define* (%installation-services
417 #:key 440 #:key
418 (system (or (and=> 441 (system (or (and=>
@@ -430,6 +453,10 @@ or by starting the installer, using `guix-system-installer` command.
430 (define bare-bones-os 453 (define bare-bones-os
431 (load "examples/bare-bones.tmpl")) 454 (load "examples/bare-bones.tmpl"))
432 455
456 (define installer
457 (installer-program
458 #:guix-for-installer guix-for-system))
459
433 (append 460 (append
434 ;; Generic services 461 ;; Generic services
435 (list (service virtual-terminal-service-type) 462 (list (service virtual-terminal-service-type)
@@ -437,8 +464,7 @@ or by starting the installer, using `guix-system-installer` command.
437 (service kmscon-service-type 464 (service kmscon-service-type
438 (kmscon-configuration 465 (kmscon-configuration
439 (virtual-terminal "tty1") 466 (virtual-terminal "tty1")
440 (login-program (installer-program 467 (login-program installer)))
441 #:guix-for-installer guix-for-system))))
442 468
443 (simple-service 'installer-login 469 (simple-service 'installer-login
444 pam-root-service-type 470 pam-root-service-type
@@ -465,6 +491,13 @@ or by starting the installer, using `guix-system-installer` command.
465 ;; network. It can be faster than fetching from remote servers. 491 ;; network. It can be faster than fetching from remote servers.
466 (service avahi-service-type) 492 (service avahi-service-type)
467 493
494 ;; Allow runninng the installer command on headless setups.
495 (simple-service 'installer-program-profile
496 profile-service-type
497 (list (installer-command-package
498 installer
499 #:executable "guix-system-installer")))
500
468 ;; The build daemon. 501 ;; The build daemon.
469 (service guix-service-type 502 (service guix-service-type
470 (guix-configuration 503 (guix-configuration