2014-05-31 20:13:33 +00:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2021-01-13 21:14:00 +00:00
|
|
|
|
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
2015-05-20 16:57:50 +00:00
|
|
|
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
2016-07-14 13:07:49 +00:00
|
|
|
|
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
|
2017-04-17 20:49:23 +00:00
|
|
|
|
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
2019-12-31 00:39:35 +00:00
|
|
|
|
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
2020-04-11 16:56:37 +00:00
|
|
|
|
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
|
install: Deduplicate packages with %base-package sets.
* gnu/system.scm (%base-packages-interactive): Add nvi.
* gnu/system/install.scm (installation-os)[packages]: Remove parted,
gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
f2fs-tools, jfstools, openssh, wireless-tools, iw,
wpa-supplicant-minimal, iproute, bash-completion, nvi. Add
%base-packages-disk-utilities.
2020-10-09 09:51:26 +00:00
|
|
|
|
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
|
2014-05-31 20:13:33 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu system install)
|
|
|
|
|
#:use-module (gnu)
|
2018-11-16 11:43:55 +00:00
|
|
|
|
#:use-module (gnu system)
|
2017-12-12 15:41:56 +00:00
|
|
|
|
#:use-module (gnu bootloader u-boot)
|
2014-05-31 20:13:33 +00:00
|
|
|
|
#:use-module (guix gexp)
|
monads: Move '%store-monad' and related procedures where they belong.
This turns (guix monads) into a generic module for monads, and moves the
store monad and related monadic procedures in their corresponding
module.
* guix/monads.scm (store-return, store-bind, %store-monad, store-lift,
text-file, interned-file, package-file, package->derivation,
package->cross-derivation, origin->derivation, imported-modules,
compiled, modules, built-derivations, run-with-store): Move to...
* guix/store.scm (store-return, store-bind, %store-monad, store-lift,
text-file, interned-file): ... here.
(%guile-for-build): New variable.
(run-with-store): Moved from monads.scm. Remove default value for
#:guile-for-build.
* guix/packages.scm (default-guile): Export.
(set-guile-for-build): New procedure.
(package-file, package->derivation, package->cross-derivation,
origin->derivation): Moved from monads.scm.
* guix/derivations.scm (%guile-for-build): Remove.
(imported-modules): Rename to...
(%imported-modules): ... this.
(compiled-modules): Rename to...
(%compiled-modules): ... this.
(built-derivations, imported-modules, compiled-modules): New
procedures.
* gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm,
gnu/services/dmd.scm, gnu/services/networking.scm,
gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm,
gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm,
guix/gexp.scm, guix/git-download.scm, guix/profiles.scm,
guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly.
* guix/monad-repl.scm (default-guile-derivation): New procedure.
(store-monad-language, run-in-store): Use it.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit
'set-guile-for-build' call.
* guix/scripts/archive.scm (derivation-from-expression): Likewise.
* guix/scripts/build.scm (options/resolve-packages): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* doc/guix.texi (The Store Monad): Adjust module names accordingly.
2015-01-14 12:34:52 +00:00
|
|
|
|
#:use-module (guix store)
|
2014-05-31 20:13:33 +00:00
|
|
|
|
#:use-module (guix monads)
|
2020-04-11 16:56:37 +00:00
|
|
|
|
#:use-module (guix modules)
|
2019-04-15 09:34:28 +00:00
|
|
|
|
#:use-module ((guix packages) #:select (package-version))
|
2014-07-22 20:12:05 +00:00
|
|
|
|
#:use-module ((guix store) #:select (%store-prefix))
|
2018-11-24 03:25:03 +00:00
|
|
|
|
#:use-module (gnu installer)
|
2020-06-07 13:39:39 +00:00
|
|
|
|
#:use-module (gnu system locale)
|
2020-12-04 10:33:16 +00:00
|
|
|
|
#:use-module (gnu services avahi)
|
2018-11-16 11:43:55 +00:00
|
|
|
|
#:use-module (gnu services dbus)
|
|
|
|
|
#:use-module (gnu services networking)
|
2016-01-27 12:45:01 +00:00
|
|
|
|
#:use-module (gnu services shepherd)
|
2017-04-17 20:49:23 +00:00
|
|
|
|
#:use-module (gnu services ssh)
|
2014-11-25 14:39:24 +00:00
|
|
|
|
#:use-module (gnu packages admin)
|
2015-05-02 22:08:37 +00:00
|
|
|
|
#:use-module (gnu packages bash)
|
2017-02-09 18:46:47 +00:00
|
|
|
|
#:use-module (gnu packages bootloaders)
|
2019-02-10 14:30:35 +00:00
|
|
|
|
#:use-module (gnu packages certs)
|
install: Deduplicate packages with %base-package sets.
* gnu/system.scm (%base-packages-interactive): Add nvi.
* gnu/system/install.scm (installation-os)[packages]: Remove parted,
gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
f2fs-tools, jfstools, openssh, wireless-tools, iw,
wpa-supplicant-minimal, iproute, bash-completion, nvi. Add
%base-packages-disk-utilities.
2020-10-09 09:51:26 +00:00
|
|
|
|
#:use-module (gnu packages compression)
|
2018-11-16 11:43:55 +00:00
|
|
|
|
#:use-module (gnu packages fonts)
|
|
|
|
|
#:use-module (gnu packages fontutils)
|
2017-12-03 16:29:10 +00:00
|
|
|
|
#:use-module (gnu packages guile)
|
2014-05-31 20:13:33 +00:00
|
|
|
|
#:use-module (gnu packages linux)
|
|
|
|
|
#:use-module (gnu packages package-management)
|
|
|
|
|
#:use-module (gnu packages texinfo)
|
2020-04-11 16:56:37 +00:00
|
|
|
|
#:use-module (gnu packages xorg)
|
2015-05-09 21:34:01 +00:00
|
|
|
|
#:use-module (ice-9 match)
|
|
|
|
|
#:use-module (srfi srfi-26)
|
2017-12-12 15:41:56 +00:00
|
|
|
|
#:export (installation-os
|
2018-01-22 21:35:06 +00:00
|
|
|
|
a20-olinuxino-lime-installation-os
|
2018-01-20 19:46:00 +00:00
|
|
|
|
a20-olinuxino-lime2-emmc-installation-os
|
2018-01-20 19:55:52 +00:00
|
|
|
|
a20-olinuxino-micro-installation-os
|
2018-09-14 19:31:24 +00:00
|
|
|
|
bananapi-m2-ultra-installation-os
|
2018-01-20 21:05:16 +00:00
|
|
|
|
beaglebone-black-installation-os
|
2018-05-07 14:32:02 +00:00
|
|
|
|
mx6cuboxi-installation-os
|
2018-05-07 14:34:43 +00:00
|
|
|
|
nintendo-nes-classic-edition-installation-os
|
2018-05-09 06:59:10 +00:00
|
|
|
|
novena-installation-os
|
2019-10-18 22:43:09 +00:00
|
|
|
|
firefly-rk3399-installation-os
|
2018-05-17 22:16:09 +00:00
|
|
|
|
pine64-plus-installation-os
|
2018-11-21 00:32:16 +00:00
|
|
|
|
pinebook-installation-os
|
2019-10-18 20:14:08 +00:00
|
|
|
|
rock64-installation-os
|
2019-10-14 06:01:53 +00:00
|
|
|
|
rockpro64-installation-os
|
2018-05-29 04:10:15 +00:00
|
|
|
|
rk3399-puma-installation-os
|
2018-06-15 07:52:42 +00:00
|
|
|
|
wandboard-installation-os
|
|
|
|
|
os-with-u-boot))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;;
|
|
|
|
|
;;; This module provides an 'operating-system' definition for use on images
|
|
|
|
|
;;; for USB sticks etc., for the installation of the GNU system.
|
|
|
|
|
;;;
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
2015-04-14 21:19:01 +00:00
|
|
|
|
|
2019-04-12 12:15:59 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; Documentation service.
|
|
|
|
|
;;;
|
|
|
|
|
|
2019-04-12 15:13:26 +00:00
|
|
|
|
(define %installation-node-names
|
|
|
|
|
;; Translated name of the "System Installation" node of the manual. Ideally
|
|
|
|
|
;; we'd extract it from the 'guix-manual' gettext domain, but that one is
|
|
|
|
|
;; usually not available at run time, hence this hack.
|
|
|
|
|
'(("de" . "Systeminstallation")
|
|
|
|
|
("en" . "System Installation")
|
2019-04-24 09:34:40 +00:00
|
|
|
|
("es" . "Instalación del sistema")
|
2019-05-13 08:50:27 +00:00
|
|
|
|
("fr" . "Installation du système")
|
|
|
|
|
("ru" . "Установка системы")))
|
2019-04-12 15:13:26 +00:00
|
|
|
|
|
2019-04-12 12:15:59 +00:00
|
|
|
|
(define (log-to-info tty user)
|
2014-05-31 20:13:33 +00:00
|
|
|
|
"Return a script that spawns the Info reader on the right section of the
|
|
|
|
|
manual."
|
2015-09-07 20:44:26 +00:00
|
|
|
|
(program-file "log-to-info"
|
2019-04-12 15:13:26 +00:00
|
|
|
|
#~(let* ((tty (open-file #$(string-append "/dev/" tty)
|
|
|
|
|
"r0+"))
|
|
|
|
|
(locale (cadr (command-line)))
|
|
|
|
|
(language (string-take locale
|
|
|
|
|
(string-index locale #\_)))
|
|
|
|
|
(infodir "/run/current-system/profile/share/info")
|
|
|
|
|
(per-lang (string-append infodir "/guix." language
|
|
|
|
|
".info.gz"))
|
|
|
|
|
(file (if (file-exists? per-lang)
|
|
|
|
|
per-lang
|
|
|
|
|
(string-append infodir "/guix.info")))
|
|
|
|
|
(node (or (assoc-ref '#$%installation-node-names
|
|
|
|
|
language)
|
|
|
|
|
"System Installation")))
|
2019-04-12 12:15:59 +00:00
|
|
|
|
(redirect-port tty (current-output-port))
|
|
|
|
|
(redirect-port tty (current-error-port))
|
|
|
|
|
(redirect-port tty (current-input-port))
|
|
|
|
|
|
|
|
|
|
(let ((pw (getpwnam #$user)))
|
|
|
|
|
(setgid (passwd:gid pw))
|
|
|
|
|
(setuid (passwd:uid pw)))
|
|
|
|
|
|
2015-01-23 09:37:01 +00:00
|
|
|
|
;; 'gunzip' is needed to decompress the doc.
|
|
|
|
|
(setenv "PATH" (string-append #$gzip "/bin"))
|
|
|
|
|
|
2019-04-12 15:13:26 +00:00
|
|
|
|
;; Change this process' locale so that command-line
|
|
|
|
|
;; arguments to 'info' are properly encoded.
|
|
|
|
|
(catch #t
|
|
|
|
|
(lambda ()
|
|
|
|
|
(setlocale LC_ALL locale)
|
|
|
|
|
(setenv "LC_ALL" locale))
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Sometimes LOCALE itself is not available. In that
|
|
|
|
|
;; case pick the one UTF-8 locale that's known to work
|
|
|
|
|
;; instead of failing.
|
|
|
|
|
(setlocale LC_ALL "en_US.utf8")
|
|
|
|
|
(setenv "LC_ALL" "en_US.utf8")))
|
|
|
|
|
|
|
|
|
|
(execl #$(file-append info-reader "/bin/info")
|
|
|
|
|
"info" "-d" infodir "-f" file "-n" node))))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
2019-04-12 12:15:59 +00:00
|
|
|
|
(define (documentation-shepherd-service tty)
|
|
|
|
|
(list (shepherd-service
|
|
|
|
|
(provision (list (symbol-append 'term- (string->symbol tty))))
|
|
|
|
|
(requirement '(user-processes host-name udev virtual-terminal))
|
2019-04-12 15:13:26 +00:00
|
|
|
|
(start #~(lambda* (#:optional (locale "en_US.utf8"))
|
|
|
|
|
(fork+exec-command
|
|
|
|
|
(list #$(log-to-info tty "documentation") locale)
|
|
|
|
|
#:environment-variables
|
|
|
|
|
`("GUIX_LOCPATH=/run/current-system/locale"
|
|
|
|
|
"TERM=linux"))))
|
2019-04-12 12:15:59 +00:00
|
|
|
|
(stop #~(make-kill-destructor)))))
|
|
|
|
|
|
|
|
|
|
(define %documentation-users
|
|
|
|
|
;; User account for the Info viewer.
|
|
|
|
|
(list (user-account (name "documentation")
|
|
|
|
|
(system? #t)
|
|
|
|
|
(group "nogroup")
|
|
|
|
|
(home-directory "/var/empty"))))
|
|
|
|
|
|
|
|
|
|
(define documentation-service-type
|
|
|
|
|
;; Documentation viewer service.
|
|
|
|
|
(service-type (name 'documentation)
|
|
|
|
|
(extensions
|
|
|
|
|
(list (service-extension shepherd-root-service-type
|
|
|
|
|
documentation-shepherd-service)
|
|
|
|
|
(service-extension account-service-type
|
|
|
|
|
(const %documentation-users))))
|
|
|
|
|
(description "Run the Info reader on a tty.")))
|
|
|
|
|
|
|
|
|
|
|
2014-07-22 20:12:05 +00:00
|
|
|
|
(define %backing-directory
|
|
|
|
|
;; Sub-directory used as the backing store for copy-on-write.
|
|
|
|
|
"/tmp/guix-inst")
|
|
|
|
|
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
(define cow-store-service-type
|
services: Rename 'dmd' services to 'shepherd'.
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service)
(dmd-service-type, <dmd-service>, dmd-service, dmd-service?)
(make-dmd-service, dmd-service-documentation, dmd-service-provision)
(dmd-service-requirement, dmd-service-respawn, dmd-service-start)
(dmd-service-stop, dmd-service-auto-start?, dmd-service-modules)
(dmd-service-imported-modules, dmd-service-file-name, dmd-service-file)
(dmd-service-back-edges): Rename to...
(shepherd-root-service-type, %shepherd-root-service, shepherd-service-type)
(<shepherd-service>, shepherd-service, shepherd-service?)
(make-shepherd-service, shepherd-service-documentation)
(shepherd-service-provision, shepherd-service-requirement)
(shepherd-service-respawn, shepherd-service-start)
(shepherd-service-stop, shepherd-service-auto-start?)
(shepherd-service-modules, shepherd-service-imported-modules)
(shepherd-service-file-name, shepherd-service-file)
(shepherd-service-back-edges): ...this
* gnu/services.scm: Adjust comments.
* gnu/services/avahi.scm (avahi-dmd-service): Rename to...
(avahi-shepherd-service): ... this.
* gnu/services/base.scm (%root-file-system-dmd-service)
(file-system->dmd-service-name, mapped-device->dmd-service-name)
(dependency->dmd-service-name, file-system-dmd-service)
(mingetty-dmd-service, nscd-dmd-service, guix-dmd-service)
(guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to...
(%root-file-system-shepherd-service)
(file-system->shepherd-service-name, mapped-device->shepherd-service-name)
(dependency->shepherd-service-name, file-system-shepherd-service)
(mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service)
(guix-publish-shepherd-service, udev-shepherd-service)
(gpm-shepherd-service): ... this.
* gnu/services/databases.scm (postgresql-dmd-service): Rename to...
(postgresql-shepherd-service): ... this.
* gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service):
Rename to...
(upower-shepherd-service, elogind-shepherd-service): ... this.
* gnu/services/dbus.scm (dbus-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/lirc.scm (lirc-dmd-service): Rename to...
(lirc-shepherd-service): ... this.
* gnu/services/mail.scm (dovecot-dmd-service): Rename to...
(dovecot-shepherd-service): ... this.
* gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service)
(bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/ssh.scm (lsh-dmd-service): Rename to...
(lsh-shepherd-service): ... this.
* gnu/services/web.scm (nginx-dmd-service): Rename to...
(nginx-shepherd-service): ... this.
* gnu/services/xorg.scm (slim-dmd-service): Rename to...
(slim-shepherd-service): ... this.
* gnu/system.scm (essential-services): Use '%shepherd-root-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type)
(export-dmd-graph): Likewise.
* tests/guix-system.sh: Likewise.
* tests/services.scm ("dmd-service-back-edges"): Rename to...
("shepherd-service-back-edges"): Adjust accordingly.
* doc/guix.texi: Likewise.
* doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-27 20:02:31 +00:00
|
|
|
|
(shepherd-service-type
|
2015-10-14 13:09:18 +00:00
|
|
|
|
'cow-store
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
(lambda _
|
2020-12-10 14:12:34 +00:00
|
|
|
|
(define (import-module? module)
|
|
|
|
|
;; Since we don't use deduplication support in 'populate-store', don't
|
|
|
|
|
;; import (guix store deduplication) and its dependencies, which
|
|
|
|
|
;; includes Guile-Gcrypt.
|
|
|
|
|
(and (guix-module-name? module)
|
|
|
|
|
(not (equal? module '(guix store deduplication)))))
|
|
|
|
|
|
services: Rename 'dmd' services to 'shepherd'.
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service)
(dmd-service-type, <dmd-service>, dmd-service, dmd-service?)
(make-dmd-service, dmd-service-documentation, dmd-service-provision)
(dmd-service-requirement, dmd-service-respawn, dmd-service-start)
(dmd-service-stop, dmd-service-auto-start?, dmd-service-modules)
(dmd-service-imported-modules, dmd-service-file-name, dmd-service-file)
(dmd-service-back-edges): Rename to...
(shepherd-root-service-type, %shepherd-root-service, shepherd-service-type)
(<shepherd-service>, shepherd-service, shepherd-service?)
(make-shepherd-service, shepherd-service-documentation)
(shepherd-service-provision, shepherd-service-requirement)
(shepherd-service-respawn, shepherd-service-start)
(shepherd-service-stop, shepherd-service-auto-start?)
(shepherd-service-modules, shepherd-service-imported-modules)
(shepherd-service-file-name, shepherd-service-file)
(shepherd-service-back-edges): ...this
* gnu/services.scm: Adjust comments.
* gnu/services/avahi.scm (avahi-dmd-service): Rename to...
(avahi-shepherd-service): ... this.
* gnu/services/base.scm (%root-file-system-dmd-service)
(file-system->dmd-service-name, mapped-device->dmd-service-name)
(dependency->dmd-service-name, file-system-dmd-service)
(mingetty-dmd-service, nscd-dmd-service, guix-dmd-service)
(guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to...
(%root-file-system-shepherd-service)
(file-system->shepherd-service-name, mapped-device->shepherd-service-name)
(dependency->shepherd-service-name, file-system-shepherd-service)
(mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service)
(guix-publish-shepherd-service, udev-shepherd-service)
(gpm-shepherd-service): ... this.
* gnu/services/databases.scm (postgresql-dmd-service): Rename to...
(postgresql-shepherd-service): ... this.
* gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service):
Rename to...
(upower-shepherd-service, elogind-shepherd-service): ... this.
* gnu/services/dbus.scm (dbus-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/lirc.scm (lirc-dmd-service): Rename to...
(lirc-shepherd-service): ... this.
* gnu/services/mail.scm (dovecot-dmd-service): Rename to...
(dovecot-shepherd-service): ... this.
* gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service)
(bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/ssh.scm (lsh-dmd-service): Rename to...
(lsh-shepherd-service): ... this.
* gnu/services/web.scm (nginx-dmd-service): Rename to...
(nginx-shepherd-service): ... this.
* gnu/services/xorg.scm (slim-dmd-service): Rename to...
(slim-shepherd-service): ... this.
* gnu/system.scm (essential-services): Use '%shepherd-root-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type)
(export-dmd-graph): Likewise.
* tests/guix-system.sh: Likewise.
* tests/services.scm ("dmd-service-back-edges"): Rename to...
("shepherd-service-back-edges"): Adjust accordingly.
* doc/guix.texi: Likewise.
* doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-27 20:02:31 +00:00
|
|
|
|
(shepherd-service
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
(requirement '(root-file-system user-processes))
|
|
|
|
|
(provision '(cow-store))
|
|
|
|
|
(documentation
|
|
|
|
|
"Make the store copy-on-write, with writes going to \
|
|
|
|
|
the given target.")
|
|
|
|
|
|
|
|
|
|
;; This is meant to be explicitly started by the user.
|
|
|
|
|
(auto-start? #f)
|
|
|
|
|
|
2020-08-12 10:16:24 +00:00
|
|
|
|
(modules `((gnu build install)
|
|
|
|
|
,@%default-modules))
|
|
|
|
|
(start
|
|
|
|
|
(with-imported-modules (source-module-closure
|
2020-12-10 14:12:34 +00:00
|
|
|
|
'((gnu build install))
|
|
|
|
|
#:select? import-module?)
|
2020-08-12 10:16:24 +00:00
|
|
|
|
#~(case-lambda
|
|
|
|
|
((target)
|
|
|
|
|
(mount-cow-store target #$%backing-directory)
|
|
|
|
|
target)
|
|
|
|
|
(else
|
|
|
|
|
;; Do nothing, and mark the service as stopped.
|
|
|
|
|
#f))))
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
(stop #~(lambda (target)
|
|
|
|
|
;; Delete the temporary directory, but leave everything
|
|
|
|
|
;; mounted as there may still be processes using it since
|
2018-03-07 09:00:07 +00:00
|
|
|
|
;; 'user-processes' doesn't depend on us. The 'user-file-systems'
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
;; service will unmount TARGET eventually.
|
|
|
|
|
(delete-file-recursively
|
2021-01-13 21:14:00 +00:00
|
|
|
|
(string-append target #$%backing-directory))))))
|
|
|
|
|
(description "Make the store copy-on-write, with writes going to \
|
|
|
|
|
the given target.")))
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
|
2014-07-22 20:12:05 +00:00
|
|
|
|
(define (cow-store-service)
|
|
|
|
|
"Return a service that makes the store copy-on-write, such that writes go to
|
|
|
|
|
the user's target storage device rather than on the RAM disk."
|
|
|
|
|
;; See <http://bugs.gnu.org/18061> for the initial report.
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
(service cow-store-service-type 'mooooh!))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define (/etc/configuration-files _)
|
|
|
|
|
"Return a list of tuples representing configuration templates to add to
|
|
|
|
|
/etc."
|
|
|
|
|
(define directory
|
|
|
|
|
(computed-file "configuration-templates"
|
2016-07-03 21:11:40 +00:00
|
|
|
|
(with-imported-modules '((guix build utils))
|
|
|
|
|
#~(begin
|
|
|
|
|
(mkdir #$output)
|
|
|
|
|
(for-each (lambda (file target)
|
|
|
|
|
(copy-file file
|
|
|
|
|
(string-append #$output "/"
|
|
|
|
|
target)))
|
2019-12-01 22:31:50 +00:00
|
|
|
|
'(#$(local-file "examples/bare-bones.tmpl")
|
|
|
|
|
#$(local-file "examples/beaglebone-black.tmpl")
|
|
|
|
|
#$(local-file "examples/desktop.tmpl")
|
|
|
|
|
#$(local-file "examples/lightweight-desktop.tmpl"))
|
2016-07-03 21:11:40 +00:00
|
|
|
|
'("bare-bones.scm"
|
2017-12-18 13:47:44 +00:00
|
|
|
|
"beaglebone-black.scm"
|
2016-07-03 21:11:40 +00:00
|
|
|
|
"desktop.scm"
|
|
|
|
|
"lightweight-desktop.scm"))
|
|
|
|
|
#t))))
|
services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.
* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
(<service-extension>, <service-type>): New record types.
(write-service-type, compute-boot-script, second-argument): New
procedures.
(%boot-service, boot-service-type): New variables.
(file-union, directory-union, modprobe-wrapper,
activation-service->script, activation-script,
gexps->activation-gexp): New procedures.
(activation-service-type, %activation-service): New variables.
(etc-directory, files->etc-directory, etc-service): New procedures.
(etc-service-type, setuid-program-service, firmware-service-type): New
variables.
(firmware->activation-gexp): New procedure.
(&service-error, &missing-target-service-error,
&ambiguous-target-service-error): New condition types.
(service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
(configuration-file): Replace keyword parameters with a single
'config' parameter.
(%avahi-accounts, %avahi-activation, avahi-service-type): New
variables.
(avahi-dmd-service): New procedure.
(avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
root-file-system-service-type): New variables.
(root-file-system-service): Use them.
(file-system->dmd-service-name): New procedure.
(file-system-service-type): New variable.
(file-system-service): Use it. Replace keyword parameters with a
single 'file-system' object.
(user-unmount-service-type): New variable.
(user-unmount-service): Use it.
(user-processes-service-type): New variable.
(user-processes-service): Use it.
(host-name-service-type): New variable.
(host-name-service): Use it.
(console-keymap-service-type): New variable.
(console-keymap-service): Use it.
(console-font-service-type): New variable.
(console-font-service): Use it.
(mingetty-pam-service, mingetty-dmd-service): New procedures.
(mingetty-service-type): New variable.
(mingetty-service): Use it.
(nscd-dmd-service): New procedure.
(nscd-activation, nscd-service-type): New variables.
(nscd-service): Use the latter.
(syslog-service-type): New variable.
(syslog-service): Use it.
(<guix-configuration>): New record type.
(%default-guix-configuration): New variable.
(guix-dmd-service, guix-accounts, guix-activation): New procedures.
(guix-service-type): New variable.
(guix-service): Replace list of keyword parameters with a single
'config' parameter. Rewrite using 'service'.
(<udev-configuration>): New record type.
(udev-dmd-service): New procedure.
(udev-service-type): New variable.
(udev-service): Use it.
(device-mapping-service-type): New variable.
(device-mapping-service): Use it.
(swap-service-type): New variable.
(swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
type.
(%postgresql-accounts, postgresql-activation): New variables.
(postgresql-dmd-service): New procedure.
(postgresql-service): Rewrite using 'service' and
'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
Remove.
(wrapped-dbus-service): New procedure.
(<upower-configuration>): New record type.
(upower-configuration-file): Replace keyword parameters with single
<upower-configuration> parameter.
(%upower-accounts, %upower-activation): New variables.
(upower-dbus-service, upower-dmd-service): New procedures.
(upower-service-type): New variable.
(upower-service): Rewrite using 'service' and 'upower-configuration'.
(%colord-activation, %colord-accounts): New variables.
(colord-dmd-service): New procedure.
(colord-service-type): New variable.
(colord-service): Rewrite using 'service'.
(<geoclue-configuration>): New record type.
(geoclue-configuration-file): Replace keyword parameters with a single
'config' parameter.
(geoclue-dbus-service, geoclue-dmd-service): New procedures.
(%geoclue-accounts, geoclue-service-type): New variables.
(geoclue-service): Rewrite using 'service' and
'geoclue-configuration'.
(%polkit-accounts, %polkit-pam-services, polkit-service-type): New
variables.
(polkit-dmd-service): New procedure.
(polkit-service): Rewrite using 'service'.
(<elogind-configuration>)[elogind]: New field.
(elogind-dmd-service): New procedure.
(elogind-service-type): New variable.
(elogind-service): Rewrite using 'service'.
(%desktop-services): Remove argument to 'dbus-service'. Remove 'map'
over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
(dmd-root-service-type, %dmd-root-service): New variables.
(dmd-service-type): New macro.
(<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
(%lirc-activation): New variable.
(lirc-dmd-service): New procedure.
(lirc-service-type): New variable.
(lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
(static-networking-service-type): New variable.
(static-networking-service): Rewrite using 'service' and
'static-networking'.
(dhcp-client-service-type): New variable.
(dhcp-client-service): Rewrite using 'service'.
(<ntp-configuration>): New record type.
(ntp-dmd-service): New procedure.
(ntp-service-type): New variable.
(ntp-service): New procedure.
(%tor-accounts, tor-service-type): New variable.
(tor-dmd-service): New procedure.
(tor-service): Rewrite using 'service'.
(<bitlbee-configuration>): New record type.
(bitlbee-dmd-service): New procedure.
(%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
variables.
(bitlbee-service): Rewrite using 'service'.
(%wicd-activation): New variable.
(wicd-dmd-service): New procedure.
(wicd-service-type): New variable.
(wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
(activation): Rename to...
(lsh-initialization): ... this.
(lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
(lsh-service-type): New variable.
(lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
(%nginx-accounts): New variable.
(nginx-activation, nginx-dmd-service): New procedures.
(nginx-service-type): New variable.
(nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
(slim-pam-service, slim-dmd-service): New procedures.
(slim-service-type): New variable.
(slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
(other-file-system-services): Adjust to new 'file-system-service'
signature.
(essential-services): Add #:container? parameter. Add
%DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
'pam-root-service', 'account-service', 'operating-system-etc-service',
and a SETUID-PROGRAM-SERVICE instance.
(operating-system-services): Pass #:container? to 'essential-services.
(etc-directory): Remove.
(operating-system-etc-service): New procedure. Rewrite as a call to
'etc-service'.
(operating-system-accounts): Change to not return accounts required by
services.
(operating-system-etc-directory): Rewrite as a call to 'fold-services'
and 'etc-directory'.
(user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
(operating-system-activation-script): Rewrite as a call to
'fold-services' and 'activation-service->script'.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Add call to 'lower-object'.
(emacs-site-file, emacs-site-directory, shells-file): Change to use
'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
(cow-store-service): Rewrite using 'service'.
(/etc/configuration-files): New procedure.
(configuration-template-service-type,
%configuration-template-service): New variables.
(configuration-template-service): Remove.
(installation-services): Adjust accordingly. Adjust argument to
'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
(pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
account-activation, etc-skel, account-service): New procedures.
(account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
(Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-09-17 21:44:26 +00:00
|
|
|
|
|
|
|
|
|
`(("configuration" ,directory)))
|
|
|
|
|
|
|
|
|
|
(define configuration-template-service-type
|
|
|
|
|
(service-type (name 'configuration-template)
|
|
|
|
|
(extensions
|
|
|
|
|
(list (service-extension etc-service-type
|
|
|
|
|
/etc/configuration-files)))))
|
|
|
|
|
|
|
|
|
|
(define %configuration-template-service
|
|
|
|
|
(service configuration-template-service-type #t))
|
system: Make service procedures non-monadic.
* gnu/services/avahi.scm (configuration-file): Use 'plain-file' instead
of 'text-file'.
(avahi-service): Turn into a regular procedure that returns a <service>.
* gnu/services/base.scm (root-file-system-service, file-system-service,
user-unmount-service, user-processes-service, host-name-service,
console-keymap-service, console-font-service, mingetty-service,
nscd.conf-file, nscd-service): Likewise.
(%default-syslog.conf): New variable.
(syslog-service): Use it. Turn into a regular procedure.
(guix-service, udev-rules-union, kvm-udev-rule, udev-service,
device-mapping-service, swap-service): Likewise.
* gnu/services/databases.scm (%default-postgres-hba,
%default-postgres-ident): Use 'plain-file' instead of 'text-file'.
(%default-postgres-config): Use 'mixed-text-file' instead of
'text-file*'.
(postgresql-service): Use 'program-file' instead of 'gexp->script'.
Turn into a regular procedure.
* gnu/services/desktop.scm (dbus-configuration-directory): Use
'computed-file' instead of 'gexp->derivation'.
(upower-configuration-file, geoclue-configuration-file,
elogind-configuration-file): Use 'plain-file' instead of 'text-file'.
(dbus-service, upower-service, colord-service, geoclue-service,
polkit-service, elogind-service): Turn into regular procedures.
(%desktop-services): Remove use of 'mlet' when iterating on
%BASE-SERVICES.
* gnu/services/lirc.scm (lirc-service): Turn into a regular procedure.
* gnu/services/networking.scm (static-networking-service,
dhcp-client-service, ntp-service, tor-service, bitlbee-service,
wicd-service): Likewise.
* gnu/services/ssh.scm (lsh-service): Likewise.
* gnu/services/web.scm (nginx-service): Likewise.
* gnu/services/xorg.scm (xorg-configuration-file): Use 'mixed-text-file'
instead of 'text-file*'.
(xorg-start-command, slim-service): Turn into regular procedures.
(xinitrc): Use 'program-file' instead of 'gexp->script'.
* gnu/system/install.scm (cow-store-service,
configuration-template-service): Turn into regular procedures.
* gnu/system.scm (other-file-system-services, device-mapping-services,
swap-services, essential-services, operating-system-services,
user-shells, operating-system-accounts): Remove now unnecessary
'mlet' and turn into regular procedures.
(operating-system-etc-directory, operating-system-activation-script,
operating-system-boot-script): Adjust accordingly.
* doc/guix.texi (Base Services, Networking Services, X Window, Desktop
Services, Database Services, Web Services, Various Services, Name
Service Switch): Adjust accordingly.
2015-09-09 07:17:31 +00:00
|
|
|
|
|
2014-07-24 20:45:24 +00:00
|
|
|
|
|
2014-12-14 16:26:03 +00:00
|
|
|
|
(define %nscd-minimal-caches
|
|
|
|
|
;; Minimal in-memory caching policy for nscd.
|
|
|
|
|
(list (nscd-cache (database 'hosts)
|
|
|
|
|
(positive-time-to-live (* 3600 12))
|
2016-02-10 20:21:38 +00:00
|
|
|
|
|
|
|
|
|
;; Do not cache lookup failures at all since they are
|
|
|
|
|
;; quite likely (for instance when someone tries to ping a
|
|
|
|
|
;; host before networking is functional.)
|
|
|
|
|
(negative-time-to-live 0)
|
|
|
|
|
|
2014-12-14 16:26:03 +00:00
|
|
|
|
(persistent? #f)
|
|
|
|
|
(max-database-size (* 5 (expt 2 20)))))) ;5 MiB
|
|
|
|
|
|
2020-04-11 16:56:37 +00:00
|
|
|
|
|
|
|
|
|
;; These define a service to load the uvesafb kernel module with the
|
|
|
|
|
;; appropriate options. The GUI installer needs it when the machine does not
|
|
|
|
|
;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0.
|
|
|
|
|
(define (uvesafb-shepherd-service _)
|
|
|
|
|
(list (shepherd-service
|
2020-04-14 17:44:53 +00:00
|
|
|
|
(documentation "Load the uvesafb kernel module if needed.")
|
|
|
|
|
(provision '(maybe-uvesafb))
|
2020-04-11 16:56:37 +00:00
|
|
|
|
(requirement '(file-systems))
|
|
|
|
|
(start #~(lambda ()
|
|
|
|
|
;; uvesafb is only supported on x86 and x86_64.
|
|
|
|
|
(or (not (and (string-suffix? "linux-gnu" %host-type)
|
|
|
|
|
(or (string-prefix? "x86_64" %host-type)
|
|
|
|
|
(string-prefix? "i686" %host-type))))
|
2020-04-14 12:49:25 +00:00
|
|
|
|
(file-exists? "/dev/fb0")
|
2020-04-11 16:56:37 +00:00
|
|
|
|
(invoke #+(file-append kmod "/bin/modprobe")
|
|
|
|
|
"uvesafb"
|
|
|
|
|
(string-append "v86d=" #$v86d "/sbin/v86d")
|
|
|
|
|
"mode_option=1024x768"))))
|
|
|
|
|
(respawn? #f)
|
|
|
|
|
(one-shot? #t))))
|
|
|
|
|
|
|
|
|
|
(define uvesafb-service-type
|
|
|
|
|
(service-type
|
|
|
|
|
(name 'uvesafb)
|
|
|
|
|
(extensions
|
|
|
|
|
(list (service-extension shepherd-root-service-type
|
|
|
|
|
uvesafb-shepherd-service)))
|
|
|
|
|
(description
|
|
|
|
|
"Load the @code{uvesafb} kernel module with the right options.")
|
|
|
|
|
(default-value #t)))
|
|
|
|
|
|
2016-12-19 17:35:54 +00:00
|
|
|
|
(define %installation-services
|
|
|
|
|
;; List of services of the installation system.
|
2018-11-23 14:18:59 +00:00
|
|
|
|
(let ((motd (plain-file "motd" "
|
2019-04-07 20:01:04 +00:00
|
|
|
|
\x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
|
2018-11-23 14:18:59 +00:00
|
|
|
|
|
2019-04-07 20:09:41 +00:00
|
|
|
|
\x1b[2m\
|
|
|
|
|
Using this shell, you can carry out the installation process \"manually.\"
|
|
|
|
|
Access documentation at any time by pressing Alt-F2.\x1b[0m
|
2018-11-23 14:18:59 +00:00
|
|
|
|
")))
|
|
|
|
|
(define (normal-tty tty)
|
|
|
|
|
(mingetty-service (mingetty-configuration (tty tty)
|
|
|
|
|
(auto-login "root")
|
|
|
|
|
(login-pause? #t))))
|
|
|
|
|
|
|
|
|
|
(define bare-bones-os
|
|
|
|
|
(load "examples/bare-bones.tmpl"))
|
|
|
|
|
|
|
|
|
|
(list (service virtual-terminal-service-type)
|
|
|
|
|
|
|
|
|
|
(service kmscon-service-type
|
|
|
|
|
(kmscon-configuration
|
|
|
|
|
(virtual-terminal "tty1")
|
2018-11-24 03:25:03 +00:00
|
|
|
|
(login-program (installer-program))))
|
2018-11-23 14:18:59 +00:00
|
|
|
|
|
|
|
|
|
(login-service (login-configuration
|
|
|
|
|
(motd motd)))
|
|
|
|
|
|
|
|
|
|
;; Documentation. The manual is in UTF-8, but
|
|
|
|
|
;; 'console-font-service' sets up Unicode support and loads a font
|
|
|
|
|
;; with all the useful glyphs like em dash and quotation marks.
|
2019-04-12 12:15:59 +00:00
|
|
|
|
(service documentation-service-type "tty2")
|
2018-11-23 14:18:59 +00:00
|
|
|
|
|
|
|
|
|
;; Documentation add-on.
|
|
|
|
|
%configuration-template-service
|
|
|
|
|
|
|
|
|
|
;; A bunch of 'root' ttys.
|
|
|
|
|
(normal-tty "tty3")
|
|
|
|
|
(normal-tty "tty4")
|
|
|
|
|
(normal-tty "tty5")
|
|
|
|
|
(normal-tty "tty6")
|
|
|
|
|
|
|
|
|
|
;; The usual services.
|
|
|
|
|
(syslog-service)
|
|
|
|
|
|
2020-12-04 10:33:16 +00:00
|
|
|
|
;; Use the Avahi daemon to discover substitute servers on the local
|
|
|
|
|
;; network. It can be faster than fetching from remote servers.
|
|
|
|
|
(service avahi-service-type)
|
|
|
|
|
|
2019-06-28 14:33:01 +00:00
|
|
|
|
;; The build daemon. Register the default substitute server key(s)
|
|
|
|
|
;; as trusted to allow the installation process to use substitutes by
|
2018-11-23 14:18:59 +00:00
|
|
|
|
;; default.
|
|
|
|
|
(service guix-service-type
|
|
|
|
|
(guix-configuration (authorize-key? #t)))
|
|
|
|
|
|
|
|
|
|
;; Start udev so that useful device nodes are available.
|
|
|
|
|
;; Use device-mapper rules for cryptsetup & co; enable the CRDA for
|
|
|
|
|
;; regulations-compliant WiFi access.
|
|
|
|
|
(udev-service #:rules (list lvm2 crda))
|
|
|
|
|
|
|
|
|
|
;; Add the 'cow-store' service, which users have to start manually
|
|
|
|
|
;; since it takes the installation directory as an argument.
|
|
|
|
|
(cow-store-service)
|
|
|
|
|
|
2019-04-12 15:19:31 +00:00
|
|
|
|
;; Install Unicode support and a suitable font.
|
2018-11-23 14:18:59 +00:00
|
|
|
|
(service console-font-service-type
|
2019-04-12 15:19:31 +00:00
|
|
|
|
(map (match-lambda
|
|
|
|
|
("tty2"
|
|
|
|
|
;; Use a font that contains characters such as
|
|
|
|
|
;; curly quotes as found in the manual.
|
|
|
|
|
'("tty2" . "LatGrkCyr-8x16"))
|
|
|
|
|
(tty
|
|
|
|
|
;; Use a font that doesn't have more than 256
|
|
|
|
|
;; glyphs so that we can use colors with varying
|
|
|
|
|
;; brightness levels (see note in setfont(8)).
|
|
|
|
|
`(,tty . "lat9u-16")))
|
2018-11-23 14:18:59 +00:00
|
|
|
|
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
|
|
|
|
|
|
|
|
|
|
;; To facilitate copy/paste.
|
|
|
|
|
(service gpm-service-type)
|
|
|
|
|
|
|
|
|
|
;; Add an SSH server to facilitate remote installs.
|
|
|
|
|
(service openssh-service-type
|
|
|
|
|
(openssh-configuration
|
|
|
|
|
(port-number 22)
|
|
|
|
|
(permit-root-login #t)
|
|
|
|
|
;; The root account is passwordless, so make sure
|
|
|
|
|
;; a password is set before allowing logins.
|
|
|
|
|
(allow-empty-passwords? #f)
|
|
|
|
|
(password-authentication? #t)
|
|
|
|
|
|
|
|
|
|
;; Don't start it upfront.
|
|
|
|
|
(%auto-start? #f)))
|
|
|
|
|
|
|
|
|
|
;; Since this is running on a USB stick with a overlayfs as the root
|
|
|
|
|
;; file system, use an appropriate cache configuration.
|
|
|
|
|
(nscd-service (nscd-configuration
|
|
|
|
|
(caches %nscd-minimal-caches)))
|
|
|
|
|
|
|
|
|
|
;; Having /bin/sh is a good idea. In particular it allows Tramp
|
|
|
|
|
;; connections to this system to work.
|
|
|
|
|
(service special-files-service-type
|
2019-12-31 08:56:51 +00:00
|
|
|
|
`(("/bin/sh" ,(file-append bash "/bin/sh"))))
|
2018-11-23 14:18:59 +00:00
|
|
|
|
|
|
|
|
|
;; Loopback device, needed by OpenSSH notably.
|
|
|
|
|
(service static-networking-service-type
|
|
|
|
|
(list (static-networking (interface "lo")
|
|
|
|
|
(ip "127.0.0.1")
|
|
|
|
|
(requirement '())
|
|
|
|
|
(provision '(loopback)))))
|
|
|
|
|
|
|
|
|
|
(service wpa-supplicant-service-type)
|
|
|
|
|
(dbus-service)
|
|
|
|
|
(service connman-service-type
|
|
|
|
|
(connman-configuration
|
|
|
|
|
(disable-vpn? #t)))
|
|
|
|
|
|
|
|
|
|
;; Keep a reference to BARE-BONES-OS to make sure it can be
|
|
|
|
|
;; installed without downloading/building anything. Also keep the
|
|
|
|
|
;; things needed by 'profile-derivation' to minimize the amount of
|
|
|
|
|
;; download.
|
|
|
|
|
(service gc-root-service-type
|
2020-06-07 13:39:39 +00:00
|
|
|
|
(append
|
|
|
|
|
(list bare-bones-os
|
|
|
|
|
glibc-utf8-locales
|
|
|
|
|
texinfo
|
|
|
|
|
guile-3.0)
|
|
|
|
|
%default-locale-libcs))
|
2020-04-11 16:56:37 +00:00
|
|
|
|
|
|
|
|
|
;; Machines without Kernel Mode Setting (those with many old and
|
|
|
|
|
;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
|
|
|
|
|
;; installer. Some may also need a kernel parameter like nomodeset
|
|
|
|
|
;; or vga=793, but we leave that for the user to specify in GRUB.
|
|
|
|
|
(service uvesafb-service-type))))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
|
|
|
|
(define %issue
|
|
|
|
|
;; Greeting.
|
|
|
|
|
"
|
2017-12-03 16:44:38 +00:00
|
|
|
|
\x1b[1;37mThis is an installation image of the GNU system. Welcome.\x1b[0m
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
2017-12-03 16:44:38 +00:00
|
|
|
|
\x1b[1;33mUse Alt-F2 for documentation.\x1b[0m
|
2014-05-31 20:13:33 +00:00
|
|
|
|
")
|
|
|
|
|
|
|
|
|
|
(define installation-os
|
|
|
|
|
;; The operating system used on installation images for USB sticks etc.
|
|
|
|
|
(operating-system
|
|
|
|
|
(host-name "gnu")
|
|
|
|
|
(timezone "Europe/Paris")
|
2014-11-29 10:37:53 +00:00
|
|
|
|
(locale "en_US.utf8")
|
2020-12-04 10:33:16 +00:00
|
|
|
|
(name-service-switch %mdns-host-lookup-nss)
|
2017-09-02 23:19:38 +00:00
|
|
|
|
(bootloader (bootloader-configuration
|
|
|
|
|
(bootloader grub-bootloader)
|
|
|
|
|
(target "/dev/sda")))
|
2019-04-15 09:34:28 +00:00
|
|
|
|
(label (string-append "GNU Guix installation "
|
|
|
|
|
(package-version guix)))
|
|
|
|
|
|
2020-10-10 17:28:46 +00:00
|
|
|
|
;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon
|
|
|
|
|
;; non-functional:
|
|
|
|
|
;; <https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00441.html>.
|
|
|
|
|
;; Thus, blacklist it.
|
|
|
|
|
(kernel-arguments '("quiet" "modprobe.blacklist=radeon"))
|
|
|
|
|
|
2014-05-31 20:13:33 +00:00
|
|
|
|
(file-systems
|
|
|
|
|
;; Note: the disk image build code overrides this root file system with
|
|
|
|
|
;; the appropriate one.
|
2016-03-24 20:22:56 +00:00
|
|
|
|
(cons* (file-system
|
|
|
|
|
(mount-point "/")
|
2019-03-13 15:44:02 +00:00
|
|
|
|
(device (file-system-label "Guix_image"))
|
2016-03-24 20:22:56 +00:00
|
|
|
|
(type "ext4"))
|
|
|
|
|
|
2017-10-27 13:33:38 +00:00
|
|
|
|
;; Make /tmp a tmpfs instead of keeping the overlayfs. This
|
|
|
|
|
;; originally was used for unionfs because FUSE creates
|
|
|
|
|
;; '.fuse_hiddenXYZ' files for each open file, and this confuses
|
|
|
|
|
;; Guix's test suite, for instance (see
|
|
|
|
|
;; <http://bugs.gnu.org/23056>). We keep this for overlayfs to be
|
2017-11-10 19:36:15 +00:00
|
|
|
|
;; on the safe side.
|
2016-03-24 20:22:56 +00:00
|
|
|
|
(file-system
|
|
|
|
|
(mount-point "/tmp")
|
|
|
|
|
(device "none")
|
|
|
|
|
(type "tmpfs")
|
|
|
|
|
(check? #f))
|
|
|
|
|
|
2016-03-24 20:48:21 +00:00
|
|
|
|
;; XXX: This should be %BASE-FILE-SYSTEMS but we don't need
|
|
|
|
|
;; elogind's cgroup file systems.
|
|
|
|
|
(list %pseudo-terminal-file-system
|
|
|
|
|
%shared-memory-file-system
|
2020-07-31 11:43:36 +00:00
|
|
|
|
%efivars-file-system
|
2016-03-24 20:48:21 +00:00
|
|
|
|
%immutable-store)))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
2018-11-23 14:18:59 +00:00
|
|
|
|
(users (list (user-account
|
|
|
|
|
(name "guest")
|
|
|
|
|
(group "users")
|
|
|
|
|
(supplementary-groups '("wheel")) ; allow use of sudo
|
|
|
|
|
(password "")
|
2019-03-22 13:06:54 +00:00
|
|
|
|
(comment "Guest of GNU"))))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
|
|
|
|
(issue %issue)
|
2016-12-19 17:35:54 +00:00
|
|
|
|
(services %installation-services)
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
2017-09-10 19:40:46 +00:00
|
|
|
|
;; We don't need setuid programs, except for 'passwd', which can be handy
|
|
|
|
|
;; if one is to allow remote SSH login to the machine being installed.
|
|
|
|
|
(setuid-programs (list (file-append shadow "/bin/passwd")))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
|
|
|
|
(pam-services
|
|
|
|
|
;; Explicitly allow for empty passwords.
|
|
|
|
|
(base-pam-services #:allow-empty-passwords? #t))
|
|
|
|
|
|
install: Deduplicate packages with %base-package sets.
* gnu/system.scm (%base-packages-interactive): Add nvi.
* gnu/system/install.scm (installation-os)[packages]: Remove parted,
gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
f2fs-tools, jfstools, openssh, wireless-tools, iw,
wpa-supplicant-minimal, iproute, bash-completion, nvi. Add
%base-packages-disk-utilities.
2020-10-09 09:51:26 +00:00
|
|
|
|
(packages (append
|
|
|
|
|
(list glibc ; for 'tzselect' & co.
|
|
|
|
|
fontconfig
|
|
|
|
|
font-dejavu font-gnu-unifont
|
|
|
|
|
grub ; mostly so xrefs to its manual work
|
|
|
|
|
nss-certs) ; To access HTTPS, use git, etc.
|
|
|
|
|
%base-packages-disk-utilities
|
|
|
|
|
%base-packages))))
|
2014-05-31 20:13:33 +00:00
|
|
|
|
|
2018-06-15 07:52:42 +00:00
|
|
|
|
(define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
|
|
|
|
|
(triplet "arm-linux-gnueabihf"))
|
|
|
|
|
"Given OS, amend it with the u-boot bootloader for BOARD,
|
|
|
|
|
installed to BOOTLOADER-TARGET (a drive), compiled for TRIPLET.
|
|
|
|
|
|
|
|
|
|
If you want a serial console, make sure to specify one in your
|
|
|
|
|
operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
|
|
|
|
|
(operating-system (inherit os)
|
|
|
|
|
(bootloader (bootloader-configuration
|
|
|
|
|
(bootloader (bootloader (inherit u-boot-bootloader)
|
|
|
|
|
(package (make-u-boot-package board triplet))))
|
|
|
|
|
(target bootloader-target)))))
|
|
|
|
|
|
2018-01-20 20:11:34 +00:00
|
|
|
|
(define* (embedded-installation-os bootloader bootloader-target tty
|
|
|
|
|
#:key (extra-modules '()))
|
|
|
|
|
"Return an installation os for embedded systems.
|
|
|
|
|
The initrd gets the extra modules EXTRA-MODULES.
|
|
|
|
|
A getty is provided on TTY.
|
|
|
|
|
The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
|
2017-12-12 15:41:56 +00:00
|
|
|
|
(operating-system
|
|
|
|
|
(inherit installation-os)
|
|
|
|
|
(bootloader (bootloader-configuration
|
2018-01-20 20:11:34 +00:00
|
|
|
|
(bootloader bootloader)
|
|
|
|
|
(target bootloader-target)))
|
2017-12-12 15:41:56 +00:00
|
|
|
|
(kernel linux-libre)
|
2018-02-09 16:07:25 +00:00
|
|
|
|
(kernel-arguments
|
|
|
|
|
(cons (string-append "console=" tty)
|
|
|
|
|
(operating-system-user-kernel-arguments installation-os)))
|
2018-02-27 10:42:09 +00:00
|
|
|
|
(initrd-modules (append extra-modules %base-initrd-modules))))
|
2017-12-12 15:41:56 +00:00
|
|
|
|
|
2018-01-20 20:11:34 +00:00
|
|
|
|
(define beaglebone-black-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-beaglebone-black-bootloader
|
|
|
|
|
"/dev/sda"
|
|
|
|
|
"ttyO0"
|
|
|
|
|
#:extra-modules
|
|
|
|
|
;; This module is required to mount the sd card.
|
|
|
|
|
'("omap_hsmmc")))
|
|
|
|
|
|
|
|
|
|
|
2018-01-23 11:00:14 +00:00
|
|
|
|
(define a20-olinuxino-lime-installation-os
|
2018-01-22 21:35:06 +00:00
|
|
|
|
(embedded-installation-os u-boot-a20-olinuxino-lime-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttyS0"))
|
|
|
|
|
|
2018-01-20 19:46:00 +00:00
|
|
|
|
(define a20-olinuxino-lime2-emmc-installation-os
|
2018-01-20 20:11:34 +00:00
|
|
|
|
(embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
|
|
|
|
|
"/dev/mmcblk1" ; eMMC storage
|
|
|
|
|
"ttyS0"))
|
2018-01-20 19:55:52 +00:00
|
|
|
|
|
|
|
|
|
(define a20-olinuxino-micro-installation-os
|
2018-01-20 20:11:34 +00:00
|
|
|
|
(embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttyS0"))
|
2018-01-20 19:46:00 +00:00
|
|
|
|
|
2018-09-14 19:31:24 +00:00
|
|
|
|
(define bananapi-m2-ultra-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-bananapi-m2-ultra-bootloader
|
2018-01-20 20:11:34 +00:00
|
|
|
|
"/dev/mmcblk1" ; eMMC storage
|
|
|
|
|
"ttyS0"))
|
2018-01-18 23:25:13 +00:00
|
|
|
|
|
2019-10-18 22:43:09 +00:00
|
|
|
|
(define firefly-rk3399-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-firefly-rk3399-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
|
|
|
|
"ttyS2")) ; UART2 connected on the Pi2 bus
|
|
|
|
|
|
2018-05-07 14:32:02 +00:00
|
|
|
|
(define mx6cuboxi-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-mx6cuboxi-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttymxc0"))
|
|
|
|
|
|
2018-05-09 06:59:10 +00:00
|
|
|
|
(define novena-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-novena-bootloader
|
|
|
|
|
"/dev/mmcblk1" ; SD card storage
|
|
|
|
|
"ttymxc1"))
|
|
|
|
|
|
2018-01-20 21:05:16 +00:00
|
|
|
|
(define nintendo-nes-classic-edition-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card (solder it yourself)
|
|
|
|
|
"ttyS0"))
|
|
|
|
|
|
2018-05-17 22:16:09 +00:00
|
|
|
|
(define pine64-plus-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-pine64-plus-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttyS0"))
|
|
|
|
|
|
2018-11-21 00:32:16 +00:00
|
|
|
|
(define pinebook-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-pinebook-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttyS0"))
|
|
|
|
|
|
2019-10-18 20:14:08 +00:00
|
|
|
|
(define rock64-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-rock64-rk3328-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
|
|
|
|
"ttyS2")) ; UART2 connected on the Pi2 bus
|
|
|
|
|
|
2019-10-14 06:01:53 +00:00
|
|
|
|
(define rockpro64-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-rockpro64-rk3399-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
|
|
|
|
|
"ttyS2")) ; UART2 connected on the Pi2 bus
|
|
|
|
|
|
2018-05-29 04:10:15 +00:00
|
|
|
|
(define rk3399-puma-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-puma-rk3399-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttyS0"))
|
|
|
|
|
|
2018-05-07 14:34:43 +00:00
|
|
|
|
(define wandboard-installation-os
|
|
|
|
|
(embedded-installation-os u-boot-wandboard-bootloader
|
|
|
|
|
"/dev/mmcblk0" ; SD card storage
|
|
|
|
|
"ttymxc0"))
|
|
|
|
|
|
2017-12-12 15:41:56 +00:00
|
|
|
|
;; Return the default os here so 'guix system' can consume it directly.
|
2014-05-31 20:13:33 +00:00
|
|
|
|
installation-os
|
|
|
|
|
|
|
|
|
|
;;; install.scm ends here
|