[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
31/80: gnu: Add service to start the installer in installation-os.
From: |
John Darrington |
Subject: |
31/80: gnu: Add service to start the installer in installation-os. |
Date: |
Tue, 3 Jan 2017 15:49:43 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 6dd156ee40e0afd5a3e62a0a32e922fe5887d3d0
Author: John Darrington <address@hidden>
Date: Sun Dec 25 09:44:25 2016 +0100
gnu: Add service to start the installer in installation-os.
* gnu/system/install.scm (guix-installer): New procedure,
(%installation-services): Add guix-installer service on tty1.
---
gnu/system/install.scm | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index ad234fd..06aaca9 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -29,10 +29,12 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages pciutils)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages package-management)
#:use-module (gnu packages disk)
#:use-module (gnu packages grub)
+ #:use-module (gnu packages guile)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
#:use-module (gnu packages nvi)
@@ -119,6 +121,37 @@ manual."
"-f" (string-append #$guix "/share/info/guix.info")
"-n" "System Installation"))))
+(define (guix-installer)
+ "Return a script that spawns the guix installer."
+ (program-file "guix-installer"
+ #~(begin
+ (setenv "TZDIR"
+ (string-append #$tzdata "/share/zoneinfo"))
+ (setenv "PATH"
+ (string-join
+ (list
+ (string-append #$bash "/bin")
+ (string-append #$coreutils "/bin") ; for ls (!)
+ (string-append #$e2fsprogs "/sbin")
+ (string-append #$iproute "/sbin")
+ (string-append #$isc-dhcp "/sbin")
+ (string-append #$iw "/sbin")
+ (string-append #$kbd "/bin")
+ (string-append #$parted "/sbin")
+ (string-append #$pciutils "/sbin")
+ (string-append #$shepherd "/bin") ; for herd
+ (string-append #$shepherd "/sbin") ; for reboot
+ (string-append #$util-linux "/sbin")
+ (string-append #$wpa-supplicant-minimal
"/sbin")
+ (string-append #$which "/bin"))
+ ":"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append #$guile-ncurses
"/share/guile/site/2.0"))
+ ;; "(current-guix)" should probably be changed to "guix"
+ ;; at some point.
+ (execl (string-append #$(current-guix) "/bin/guix")
+ "guix" "system" "installer"))))
+
(define %backing-directory
;; Sub-directory used as the backing store for copy-on-write.
"/tmp/guix-inst")
@@ -273,7 +306,8 @@ You have been warned. Thanks for being so brave.
(list (mingetty-service (mingetty-configuration
(tty "tty1")
- (auto-login "root")))
+ (auto-login "root")
+ (login-program (guix-installer))))
(login-service (login-configuration
(motd motd)))
- 19/80: installer: Handle the 'back' action in the filesystems task., (continued)
- 19/80: installer: Handle the 'back' action in the filesystems task., John Darrington, 2017/01/03
- 23/80: installer: Fix incorrect host in ping task., John Darrington, 2017/01/03
- 25/80: installer: Use a cleaner way of generating the lspci information., John Darrington, 2017/01/03
- 24/80: installer: Make "interfaces" return an alist., John Darrington, 2017/01/03
- 27/80: installer: Connect ethernet interfaces on selection., John Darrington, 2017/01/03
- 28/80: installer: Let the kernel know about (possibly) changed partitions., John Darrington, 2017/01/03
- 49/80: installer: Wrap installer in (catch #t ...), John Darrington, 2017/01/03
- 09/80: installer: Use a record instead of a list to contain tasks., John Darrington, 2017/01/03
- 29/80: installer: Deal with partition tables which are (partially) corrupt., John Darrington, 2017/01/03
- 37/80: installer: Improve dependencies on the final task., John Darrington, 2017/01/03
- 31/80: gnu: Add service to start the installer in installation-os.,
John Darrington <=
- 36/80: installer: Remove ad-hoc completed predicate and use standard one., John Darrington, 2017/01/03
- 35/80: installer: Make minumum-store-size variable global., John Darrington, 2017/01/03
- 34/80: installer: Add path to mount/umount commands in installer service., John Darrington, 2017/01/03
- 58/80: installer: Allow users to remove mount points during configuration., John Darrington, 2017/01/03
- 11/80: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2017/01/03
- 14/80: installer: Add alternate method of finding TZDIR., John Darrington, 2017/01/03
- 13/80: installer: Use call-with-temporary-output-file., John Darrington, 2017/01/03
- 22/80: installer: Return slurped lines in their correct order., John Darrington, 2017/01/03
- 16/80: installer: Use %default-subsitute-urls instead of our own variable., John Darrington, 2017/01/03
- 10/80: installer: Perform a task's dependencies prior to the task itself., John Darrington, 2017/01/03