Commit Graph

213 Commits

Author SHA1 Message Date
Ludovic Courtès 74685a4369
services: file-system: Filter what goes to /etc/fstab.
Fixes a longstanding issue whereby, due to our long fstab that included
pseudo file systems like cgroup mounts, graphical file managers would
display all of these.  Initially reported at
<https://lists.gnu.org/archive/html/help-guix/2017-11/msg00084.html>.

* gnu/services/base.scm (file-system-fstab-entries): New procedure.
(file-system-service-type): Use it to extend FSTAB-SERVICE-TYPE.
2019-04-27 00:11:52 +02:00
Ludovic Courtès 3a665637af
services: console-keymap: Deprecate.
* gnu/services/base.scm (console-keymap-service): Mark as deprecated.
* doc/guix.texi (Base Services): Remove its documentation.
2019-04-05 15:39:35 +02:00
Ludovic Courtès c1ef50ac79
gexp: Remove workarounds for <https://bugs.gnu.org/15602>.
* gnu/services/base.scm (hydra-key-authorization)[aaa]: Remove.
[default-acl]: Don't import it.
* guix/scripts/pack.scm (store-database)[build]: Don't import
(gnu build install).
2019-04-04 17:47:02 +02:00
Ludovic Courtès 59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès 8b3ad455be
services: guix: Pre-compute the default ACL.
This makes the first boot slightly faster.

* gnu/services/base.scm (not-config?): New procedure.
(hydra-key-authorization): Rewrite to pre-compute the default ACL, and
pre-compute it using (guix pki) directly.
2019-03-10 23:41:33 +01:00
Ludovic Courtès 309d87c3aa
services: guix: Allocate build user UIDs in the system range.
Until now we were allocating the UIDs of build users above 30000, which
is in "normal" user UID range.  This static allocation was unnecessary,
so this change lets the system allocate UIDs in the system range (below
1000).

* gnu/services/base.scm (guix-build-accounts): Remove #:first-uid, and
remove 'uid' field from 'user-account'.
2019-03-10 23:41:33 +01:00
Efraim Flashner 76a2b2db1a
gnu: %base-services: Use *getty-service-type.
* gnu/services/base.scm (%base-services): Replace agetty-service with
agetty-service-type, mingetty-service with mingetty-service-type.
2019-01-20 16:11:07 +02:00
Efraim Flashner 178bce41d8
gnu: %base-services: Use login-service-type.
* gnu/services/base.scm (login-service-type)[default-value]: New field.
(%base-services): Replace login-service with login-service-type.
2019-01-20 16:11:05 +02:00
Efraim Flashner fd779db9e4
services: %base-services: Use udev-service-type.
* gnu/services/base.scm (udev-configuration): Fix typo.
(udev-service-type)[default-value]: New field.
(%base-services): Replace udev-service with udev-service-type.
2019-01-20 16:11:05 +02:00
Efraim Flashner db9035492b
services: %base-services: Use nscd-service-type.
* gnu/services/base.scm (nscd-service-type)[default-value]: New field.
(%base-services): Replace nscd-service with nscd-service-type.
2019-01-20 16:11:04 +02:00
Efraim Flashner 7194745a16
services: Use guix-service-type.
* gnu/services/base.scm (%base-services): Replace guix-service with
guix-service-type.
* gnu/system/examples/docker-image.tmpl (services): Same.
2019-01-20 16:11:00 +02:00
Mathieu Othacehe 76421cf0d2
services: kmscon: Remove virtual-terminal requirement.
kmscon does not require that virtual terminals run in UTF-8 mode.

* gnu/services/base.scm (kmscon-service-type): Remove virtual-terminal from
requirement list.
2019-01-17 14:04:20 +01:00
Ludovic Courtès 84a2de36a1
services: Deprecate a few more service procedures.
These procedures were already either undocumented (and de facto
deprecated) or documented as deprecated or redundant.

* gnu/services/base.scm (guix-service, guix-publish-service): Mark as
deprecated.
* gnu/services/mcron.scm (mcron-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
* doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and
adjust example.
(Networking Services): Remove 'tor-service'.
* gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of
'mcron-service'.
* gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of
'tor-service'.
* tests/guix-system.sh: Likewise.
2019-01-11 12:14:38 +01:00
Ludovic Courtès 65a67bf711
services: Use 'define-deprecated' for service procedures.
* gnu/services/base.scm (urandom-seed-service, gpm-service): Define
using 'define-deprecated'.
* gnu/services/messaging.scm (bitlbee-service): Likewise.
* gnu/services/networking.scm (dhcp-client-service): Likewise.
(ntp-service): Likewise.
* gnu/services/xorg.scm (slim-service): Likewise.
(gdm-service): Likewise.
2019-01-10 14:59:23 +01:00
Ludovic Courtès bafcf1f32f
services: udev: Add 'rules' action.
* gnu/services/base.scm (udev-shepherd-service): Add 'actions' field.
* doc/guix.texi (Base Services): Move "@end deffn" after 'udev-service'
definition.  Mention 'herd rules udev'.
2018-12-17 23:33:42 +01:00
Ludovic Courtès 7e4bc21509
services: guix: Run 'guix-daemon' in UTF-8 locale.
Fixes <https://bugs.gnu.org/32942>.
Reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/services/base.scm (guix-shepherd-service) <start>: In
 #:environment-variables, add "GUIX_LOCPATH" and "LC_ALL".
2018-12-10 00:28:11 +01:00
Ludovic Courtès 970ebdae8c
services: guix-daemon: Fix authorization of multiple keys.
Previously, the 'unless (file-exists? "/etc/guix/acl")' guard would mean
that only the first key in the list would get registered since were were
generating one registration snippet per key.  This fixes that.

* gnu/services/base.scm (hydra-key-authorization): Change to be a
'for-each' loop iterating on #$KEYS.
2018-12-05 16:24:50 +01:00
Ludovic Courtès 0bc02becca
Remove most references to hydra.gnu.org.
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org
in comment.
* build-aux/check-available-binaries.scm: Likewise.
* build-aux/check-final-inputs-self-contained.scm: Likewise.
* doc/guix.texi (SUBSTITUTE-SERVER): New variable.
Use it throughout instead of "mirror.hydra.gnu.org".
* doc/contributing.texi (Submitting Patches): Likewise.
* gnu/services/base.scm (hydra-key-authorization)
(guix-activation): Remove mentions of "hydra.gnu.org" in comments and
messages.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
2018-12-04 10:57:56 +01:00
Ludovic Courtès d3f75179e5
services: nscd: Add 'invalidate' and 'statistics' actions.
* gnu/services/base.scm (nscd-action-procedure, nscd-actions): New
procedures.
(nscd-shepherd-service): Add 'modules' and 'actions' fields.
* gnu/tests/base.scm (run-basic-test)["nscd invalidate action"]
["nscd invalidate action, wrong table"]: New tests.
* doc/guix.texi (Services): Mention 'herd doc nscd action'.
(Base Services): Document the actions.
2018-11-13 14:59:45 +01:00
Mathieu Othacehe 2d9dace8c2
services: kmscon: Add an auto-login option.
Add an auto-login option that behaves as the one of mingetty-service.

* gnu/services/base.scm (kmscon-configuration)[auto-login]: New field.
(kmscon-service-type): Pass it to kmscon command.
* doc/guix.texi (Base Services): Document it.
2018-11-07 18:21:42 +09:00
Mathieu Othacehe f4e8bc5f25
services: kmscon: Do not switch to vt at start.
* gnu/services/base.scm (kmscon-service-type): Add "--no-switchvt" to kmscon
command.
2018-11-07 18:15:00 +09:00
Ludovic Courtès 09b7300c01
services: virtual-terminal: Write to "default_utf8" only if necessary.
Fixes a bug in containers whereby 'virtual-terminal' would always fail
to start because writing to /sys/…/default_utf8 would fail with EROFS.

* gnu/services/base.scm (virtual-terminal-service-type): Read from
"default_utf8" before attempting to write to it.
2018-09-26 23:40:37 +02:00
Ludovic Courtès 23784f0c33
services: udev: Don't attempt to read "modules.devname" from a container.
Fixes <https://bugs.gnu.org/32814>.
Reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/services/base.scm (udev-shepherd-service)[start]: Check whether
DIRECTORY exists and skip 'make-static-device-nodes' call if it doesn't.
2018-09-26 23:40:37 +02:00
Ludovic Courtès 241358dc94
services: networking: Remove unbound variable reference in 'stop'.
* gnu/services/base.scm (static-networking-shepherd-service): Remove
spurious ":" in 'stop' method inadvertently introduced in commit
c9436025a9.
2018-09-19 18:25:28 +02:00
Ludovic Courtès 7fd3082522
services: udev: Simplify 'start' method.
* gnu/services/base.scm (udev-shepherd-service)[start](find): Remove.
(udev): Hardwire the eudev file name.
Use 'fork+exec-command' instead of 'primitive-fork' and 'exec-command'.
2018-09-19 18:25:27 +02:00
Danny Milosavljevic c106d03b88
services: file-system-shepherd-service: Require "udev" service.
Fixes <https://bugs.gnu.org/32313>.
Reported by Brendan Tildesley <brendan.tildesley@openmailbox.org>

* gnu/services/base.scm (file-system-shepherd-service): Require "udev" service.
2018-08-02 15:21:33 +02:00
Ludovic Courtès a043b5b81a
services: mingetty: Use '--nohangup'.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00049.html>.

* gnu/services/base.scm (mingetty-shepherd-service): Pass "--nohangup"
to mingetty.
2018-07-05 00:14:01 +02:00
Ludovic Courtès 6892f0a247
store-copy: 'read-reference-graph' returns a list of records.
The previous implementation of 'read-reference-graph' was good enough
for many use cases, but it discarded the graph structure, which is
useful information in some cases.

* guix/build/store-copy.scm (<store-info>): New record type.
(read-reference-graph): Rewrite to return a list of <store-info>.
(closure-size, populate-store): Adjust accordingly.
* gnu/services/base.scm (references-file): Adjust accordingly.
* gnu/system/vm.scm (system-docker-image): Likewise.
* guix/scripts/pack.scm (squashfs-image, docker-image): Likewise.
* tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
2018-06-14 11:16:58 +02:00
Ludovic Courtès 0d56d9c714
services: fstab: Properly handle file system labels.
Fixes a regression introduced in
a5acc17a3c.

Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/services/base.scm (file-system->fstab-entry): Pass LABEL, not
FILE-SYSTEM, to 'file-system-label->string'.
2018-05-29 15:09:44 +02:00
Ludovic Courtès a5acc17a3c
file-systems: Remove 'title' field and add <file-system-label>.
The 'title' field was easily overlooked and was an endless source of
confusion.  Now, the value of the 'device' field is self-contained.

* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field.  Rewrite documentation of 'device' and document
'file-system-label'.
2018-05-28 13:24:11 +02:00
Ludovic Courtès 5986e94118
services: gpm: Provide a default value and document 'gpm-service-type'.
* gnu/services/base.scm (%default-gpm-options): New variable.
(<gpm-configuration>)[gpm, options]: Add default values.
(gpm-service-type)[default-value]: New field.
(gpm-service): Use %DEFAULT-GPM-OPTIONS and mark as deprecated.
* doc/guix.texi (Base Services): Document 'gpm-service-type' and
'gpm-configuration'.  Remove 'gpm-service'.
2018-04-30 14:22:43 +02:00
Danny Milosavljevic c9436025a9
services: Move static-networking to (gnu services base).
* gnu/services/networking.scm (static-networking, static-networking?,
static-networking-interface, static-networking-ip, static-networking-netmask,
static-networking-gateway, static-networking-requirement,
static-networking-service, static-networking-service-type): Move to...
* gnu/services/base.scm: ...here.
2018-04-30 03:47:14 +02:00
Ludovic Courtès bb3062ad62
services: Add 'virtual-terminal'.
Fixes <https://bugs.gnu.org/30505>.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/services/base.scm (unicode-start): Remove.
(virtual-terminal-service-type): New variable.
(console-font-shepherd-services): Remove 'modules'; remove call to
'unicode-start'.  Add 'virtual-terminal' to 'requirement'.
(mingetty-shepherd-service, kmscon-service-type): Likewise.
(%base-services): Add 'virtual-terminal-service-type'.
* gnu/system/install.scm (%installation-services): Likewise.
2018-03-15 11:37:18 +01:00
Danny Milosavljevic c32e3ddedd
services: agetty: Call default-serial-port only when starting.
* gnu/services/base.scm (agetty-shepherd-service): Call default-serial-port
only when starting.
2018-03-08 13:16:30 +01:00
Ludovic Courtès 6c4458172d
services: file-systems: Include 'user-file-systems' service.
Previously the KNOWN-FS value used in 'essential-services' would be
incomplete: it would lack all the file systems provided by services that
extend 'file-system-service-type' (/sys/fs/cgroup,
/proc/sys/fs/binfmt_misc, etc.)  Consequently, upon shutdown,
'user-processes' would unmount these file systems before their
corresponding service had been stopped; when their corresponding (e.g.,
'file-system-/proc/sys/fs/binfmt_misc') was stopped, its 'umount' call
would fail.

This was harmless in practice, but this patch makes sure things work as
intended and file systems are unmounted in the right order.

* gnu/services/base.scm (file-system-shepherd-services): Instantiate
'user-file-systems' Shepherd service from here.
(user-unmount-service-type, user-unmount-service): Remove.
* gnu/system.scm (essential-services): Remove call to 'user-unmount-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust comment.
2018-03-07 11:22:42 +01:00
Ludovic Courtès ce0a62f6c5
services: console-font: Don't emit the IUTF8 console code.
Fixes <https://bugs.gnu.org/30505>.

* gnu/services/base.scm (unicode-start): Remove 'display' call to FD for
"\x1b%G" console code.
2018-02-19 22:04:10 +01:00
Danny Milosavljevic 7e0a6fac0b
services: mingetty: Move tty optionality to agetty.
Follow-up to 5a9902c8ac.

* gnu/services/base.scm (mingetty-shepherd-service): Move tty optionality check to...
(agetty-shepherd-service): ...here.
2018-02-15 12:32:18 +01:00
Danny Milosavljevic 5a9902c8ac
services: agetty: Add agetty instance to base services. Make its tty optional.
* gnu/services/base.scm (%base-services): Instantiate agetty-service.
(default-serial-port): New variable.
(agetty-shepherd-service): Make tty optional, default to the above.
* doc/guix.texi (agetty-configuration): Update "tty" documentation.
* gnu/system/install.scm (agetty-default-service): Delete variable.
(embedded-installation-os): Remove agetty-default-service instance.
Add "console" kernel-argument.
2018-02-15 12:05:21 +01:00
Ludovic Courtès 88554b5d05
services: guix: Add 'chroot-directories' field.
* gnu/services/base.scm (<guix-configuration>)[chroot-directories]: New
field.
(guix-shepherd-service): Honor it.
(references-file): New procedure.
(guix-service-type)[compose, extend]: New fields.
2018-01-11 14:30:00 +01:00
Ludovic Courtès f4596f7630
services: guix: Add 'log-compression' option.
* gnu/services/base.scm (<guix-configuration>)[log-compression]: New
field.
(guix-shepherd-service): Use 'match-record' instead of 'match'.  Honor
'log-compression'.
* doc/guix.texi (Base Services): Document 'log-compression'.
2018-01-08 10:40:17 +01:00
Marius Bakke db8ed7cee8
services: networking: Add a dependency override mechanism to <static-networking>.
* gnu/services/networking.scm (<static-networking>)[requirement]: New field.
(static-networking-shepherd-service): Don't override requirement for loopback.
(static-networking-service): Expose 'requirement' parameter.  Default to UDEV.
* gnu/services/base.scm (%base-services): Add (requirement '()) for loopback service.
* doc/guix.texi (Networking Services): Document it.
2017-12-29 14:06:26 +01:00
Ludovic Courtès 4a32f58aa1
services: urandom-seed: Depend on udev.
Suggested by Leo Famulari <leo@famulari.name>.

* gnu/services/base.scm (urandom-seed-shepherd-service): Add 'udev' to
'requirement'.
2017-12-22 08:56:50 +01:00
Ludovic Courtès 8faaf8d7cc
services: urandom-seed: Deprecate the 'urandom-seed-service' procedure.
* gnu/services/base.scm (urandom-seed-service-type)[default-value]: New
field.
(urandom-seed-service): Mark as deprecated.
(%base-services): Use URANDOM-SEED-SERVICE-TYPE directly.
* gnu/services/base.scm (%base-services):
* doc/guix.texi (Base Services): Document 'urandom-seed-service-type'
instead of 'urandom-seed-service'.
2017-12-22 08:56:50 +01:00
Ludovic Courtès 4e9fd50857
services: urandom-seed: Become a dependency of 'user-processes'.
This ensures that 'urandom-seed' is started before programs that rely on
sources of randomness.

Fixes <https://bugs.gnu.org/29773>.
Reported by Leo Famulari <leo@famulari.name>.

* gnu/services/base.scm (urandom-seed-shepherd-service): Change
'requirement' to (file-systems).
(urandom-seed-service-type): Extend USER-PROCESSES-SERVICE-TYPE.
2017-12-22 08:56:50 +01:00
Ludovic Courtès 206a28d84a
services: 'user-processes-service-type' can now be extended.
* gnu/services/base.scm (user-processes-shepherd-service): New
procedure, taken from former 'user-processes-service-type'.  Add
REQUIREMENTS argument; remove GRACE-DELAY argument.
(user-processes-service-type): Redefine in terms of 'service-type'.
(user-processes-service): Remove.
(file-system-service-type): Extend USER-PROCESSES-SERVICE-TYPE.
* gnu/system.scm (essential-services): Use USER-PROCESSES-SERVICE-TYPE
directly.
2017-12-22 08:56:50 +01:00
Leo Famulari 9a56cf2b5b
services: urandom-seed: Try using a HWRNG to seed the Linux CRNG at boot.
* gnu/services/base.scm (urandom-seed-shepherd-service): Try to read from
'/dev/hwrng' at boot, as a supplement to any saved random seed.
* doc/guix.texi (Base Services): Document the new feature.
2017-12-19 11:31:24 -05:00
Danny Milosavljevic 86e6b4c931
services: base: Use make-static-device-nodes.
Fixes <https://bugs.gnu.org/22050>.

* gnu/services/base.scm (udev-shepherd-service): Use make-static-device-nodes.
2017-12-16 07:33:12 +01:00
Ludovic Courtès 787e8a80d5
services: console-font: Use 'tcsetattr' instead of invoking 'unicode_start'.
This is more robust, faster, and incidentally gets rid of remaining
"error in the finalization thread: Bad file descriptor" messages.

* gnu/services/base.scm (unicode-start): Rewrite to use 'tcgetattr' and
'tcsetattr'.
(console-font-shepherd-services)[start]: Add 'loop' to check whether
DEVICE is ready.  Tolerate EX_OSERR return from 'setfont'.
[modules]: New field.
2017-12-06 08:52:31 +01:00
Ludovic Courtès be5622e7f1
maint: Add 'berlin.guixsd.org.pub'.
* bayfront.guixsd.org.pub: Rename to...
* berlin.guixsd.org.pub: ... this.
* Makefile.am (dist_pkgdata_DATA): Adjust accordingly.
* gnu/services/base.scm (%default-authorized-guix-keys): Likewise.
2017-12-04 17:57:37 +01:00
Ludovic Courtès a0fea77dbb
services: guix: Remove dependency on 'lsof'.
This is a followup to b8f59cdc20e9d83ce63523ef917e95fcee07f134:
'list-runtime-roots' no longer depends on 'lsof'.

* gnu/services/base.scm (<guix-configuration>)[lsof]: Remove.
(guix-shepherd-service): Adjust accordingly.
* doc/guix.texi (Base Services): Adjust accordingly.
* gnu/system.scm (%base-packages): Remove LSOF.
2017-11-13 11:36:28 +01:00