mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
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
This commit is contained in:
+35
-2
@@ -25,9 +25,11 @@
|
|||||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (gnu system install)
|
(define-module (gnu system install)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (gnu)
|
#:use-module (gnu)
|
||||||
#:use-module (gnu system)
|
#:use-module (gnu system)
|
||||||
#:use-module (gnu system privilege)
|
#:use-module (gnu system privilege)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
#:use-module (gnu bootloader)
|
#:use-module (gnu bootloader)
|
||||||
#:use-module (gnu bootloader u-boot)
|
#:use-module (gnu bootloader u-boot)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
@@ -413,6 +415,27 @@ or by starting the installer, using `guix-system-installer` command.
|
|||||||
#$(file-append shadow "/bin/login")
|
#$(file-append shadow "/bin/login")
|
||||||
(command-line)))))
|
(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
|
(define* (%installation-services
|
||||||
#:key
|
#:key
|
||||||
(system (or (and=>
|
(system (or (and=>
|
||||||
@@ -430,6 +453,10 @@ or by starting the installer, using `guix-system-installer` command.
|
|||||||
(define bare-bones-os
|
(define bare-bones-os
|
||||||
(load "examples/bare-bones.tmpl"))
|
(load "examples/bare-bones.tmpl"))
|
||||||
|
|
||||||
|
(define installer
|
||||||
|
(installer-program
|
||||||
|
#:guix-for-installer guix-for-system))
|
||||||
|
|
||||||
(append
|
(append
|
||||||
;; Generic services
|
;; Generic services
|
||||||
(list (service virtual-terminal-service-type)
|
(list (service virtual-terminal-service-type)
|
||||||
@@ -437,8 +464,7 @@ or by starting the installer, using `guix-system-installer` command.
|
|||||||
(service kmscon-service-type
|
(service kmscon-service-type
|
||||||
(kmscon-configuration
|
(kmscon-configuration
|
||||||
(virtual-terminal "tty1")
|
(virtual-terminal "tty1")
|
||||||
(login-program (installer-program
|
(login-program installer)))
|
||||||
#:guix-for-installer guix-for-system))))
|
|
||||||
|
|
||||||
(simple-service 'installer-login
|
(simple-service 'installer-login
|
||||||
pam-root-service-type
|
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.
|
;; network. It can be faster than fetching from remote servers.
|
||||||
(service avahi-service-type)
|
(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.
|
;; The build daemon.
|
||||||
(service guix-service-type
|
(service guix-service-type
|
||||||
(guix-configuration
|
(guix-configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user