summaryrefslogtreecommitdiff
path: root/px/system/install.scm
blob: 7451d7eb952fb599615eeaa39e5456413f3aba6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
;; PantherX disk image configuration file
;;
;; Generate a bootable image (e.g. for USB sticks, etc.) with:
;; $ guix system image --image-type=iso9660 px/system/install.scm
;; Using Guix time-machine
;; $ guix time-machine --channels=/path/to/channels.scm -- system disk-image -t iso9660 px/system/install.scm
;; Flash to USB stick (e.g. /dev/sdb) with:
;; $ dd if=/path/to/disk-image of=/dev/sdb bs=4M status=progress oflag=sync

(define-module (px system install)
  #:use-module (guix channels)
  #:use-module (guix gexp)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages vim)
  #:use-module (gnu packages libusb)
  #:use-module (gnu services)
  #:use-module (gnu services base)
  #:use-module (gnu system)
  #:use-module (gnu system install)
  #:use-module (nongnu packages linux)
  #:use-module (px packages setup)
  #:use-module (px system config)
  #:use-module (px system os)
  #:export (installation-os-nonfree))

(define %issue
  ;; Greeting.
  "
\x1b[1;37mThis is a PantherX OS installation image.\x1b[0m
\x1b[1;37mVisit wiki.pantherx.org for more information.\x1b[0m

\x1b[1;33mStart with: px-install run\x1b[0m

")

(define px-installation-os
  (operating-system
    (inherit installation-os)
    (host-name "panther")
    (kernel linux-lts)
    (firmware (list linux-firmware))

    (issue %issue)

    (packages (cons* px-install
                     ;; Wi-Fi connection via CLI
                     wpa-supplicant
                     ;; iPhone USB tethering
                     libimobiledevice
                     ;; Editing
                     neovim
                     (operating-system-packages installation-os)))
    (services
     (modify-services (operating-system-user-services installation-os)
       (guix-service-type
        config => (guix-configuration
                   (inherit config)
                   (guix (guix-for-channels %pantherx-default-channels))
                   (authorized-keys
                    (cons* %px-substitute-server-key
                           %nonguix-substitute-server-key
                           %default-authorized-guix-keys))
                   (substitute-urls
                    (cons* %px-substitute-server-url
                           %nonguix-substitute-server-url
                           %default-substitute-urls))
                   (channels %pantherx-default-channels)))))))

px-installation-os