mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06: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:
parent
94f9177cf8
commit
9448ec6fb2
1 changed files with 35 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue