Commit graph

356 commits

Author SHA1 Message Date
Bruno Victal 31b1e22926
services: base: Deprecate 'rngd-service' procedure.
* doc/guix.texi (Base Services): Replace rngd-service with rngd-service-type.
Document <rngd-configuration>.
* gnu/services/base.scm (<rngd-configuration>): Set default values from
the values in the now deprecated 'rngd-service' procedure.
(rngd-service): Deprecate procedure.
(rngd-service-type): Set default value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:33 +01:00
Bruno Victal 2e7516168e
services: base: Deprecate 'udev-service' procedure.
* doc/guix.texi (Base Services): Replace udev-service with udev-service-type.
Document <udev-configuration>. Use @defun @-commands for udev-rules-service,
udev-rule and file->udev-rule.
* gnu/services/base.scm (udev-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use udev-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal 6edacf2491
services: base: Deprecate 'syslog-service' procedure.
* doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type.
* gnu/services/base.scm (%default-syslog.conf): Place before <syslog-configuration>.
(syslog-service-type): Set default value.
(syslog-service): Deprecate procedure.
(%base-services): Use syslog-service-type.
* gnu/system/hurd.scm (%base-services/hurd): Ditto.
* gnu/system/install.scm (%installation-services): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal 98e9dc6ab7
services: base: Deprecate 'nscd-service' procedure.
* doc/guix.texi (Application Setup): Compress @cindex entries.
(Base Services): Compress @cindex entries. Delete %nscd-default-configuration.
Replace 'nscd-service' with 'nscd-service-type'.
* gnu/services/base.scm (%nscd-default-configuration): Deprecate variable.
(nscd-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use nscd-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal 4892c0186e
services: base: Deprecate 'agetty-service' procedure.
* doc/guix.texi (Base Services): Replace agetty-service with
agetty-service-type.
* gnu/services/base.scm (agetty-service): Deprecate procedure.
* gnu/system/examples/beaglebone-black.tmpl
(operating-system)[services]: Use agetty-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal ad665a38fc
services: base: Deprecate 'mingetty-service' procedure.
* doc/guix.texi (Base Services): Replace mingetty-service with
mingetty-service-type.
* gnu/services/base.scm (mingetty-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal 6dd635b4cf
services: base: Deprecate 'login-service' procedure.
* doc/guix.texi (Base Services): Replace with login-service-type.
* gnu/services/base.scm (login-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use login-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal cb00e600ff
services: base: Deprecate 'host-name-service' procedure.
* doc/guix.texi (operating-system Reference): Reorder cross-reference.
Add an anchor to be used ...
(Base services): ... here by host-name-service-type. Document
host-name-service-type.
* gnu/services/base.scm: Export host-name-service-type.
(host-name-service): Deprecate procedure.
* gnu/system.scm (operating-system-default-essential-services): Use
host-name-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:31 +01:00
Ludovic Courtès d00c2e9c2b
services: console-font, kmscon: Refer to native 'font-gnu-unifont' builds.
Fixes a regression introduce in 01334a61c7
that would prevent system cross-compilation (with "guix system image
--target=...") due to 'font-gnu-unifont' depending on 'perl-gd', which
currently cannot be cross-compiled.

* gnu/services/base.scm (%default-console-font, kmscon-service-type):
Refer to 'font-gnu-unifont' with 'ungexp-native'.
2023-02-25 00:00:33 +01:00
Ludovic Courtès 35e64a8793
services: hosts: Do not export '%host'.
This was not meant to be exported.

* gnu/services/base.scm (%host): Do not export.
* doc/guix.texi (Base Services): Remove mention.
2023-02-23 16:31:36 +01:00
Julien Lepiller 01334a61c7
gnu: Use unifont by default in TTYs.
It has even better language support than LatGrkCyr-8x16 and can show
fancy progress bars.

* gnu/services/base.scm (%default-console-font): Use unifont.
2023-02-19 10:09:10 +01:00
Jelle Licht 06e3f239b9
services: greetd: Fix configuration serialization.
* gnu/services/base.scm (make-greetd-terminal-configuration-file): Add missing
'general' section to configuration file.
2023-02-09 15:33:29 +01:00
Bruno Victal 22dd558c70
services: Add hosts-service-type.
* gnu/services/base.scm (<host>): New record type.
(host): New procedure.
(hosts-service-type): New variable.
* doc/guix.texi (Service Reference): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-02-09 01:07:39 +01:00
Jelle Licht a5b914156e
services: greetd: Add 'source-profile?' configuration field.
* gnu/services/base.scm (<greetd-terminal-configuration>)[source-profile?]:
New field.
(make-greetd-terminal-configuration-file): Serialize new field to
configuration file.
* doc/guix.texi (Base Services): Document it.
2023-01-15 20:30:12 +01:00
Mathieu Othacehe 8b314efd50
services: base: Add environment support to guix-configuration.
* gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
(guix-shepherd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
2023-01-09 17:15:28 +01:00
Mathieu Othacehe 699d104146
Revert "services: base: Add extra-env support to guix-configuration."
This reverts commit 78a9b4f996. It was pushed by
error, while not reviewed yet.
2023-01-07 20:14:24 +01:00
Mathieu Othacehe 78a9b4f996
services: base: Add extra-env support to guix-configuration.
* gnu/services/base.scm (<guix-configuration>)[extra-env]: New field.
(guix-shepherd-service): Honor it.
* doc/guix.texi (Base Services): Document it.
2023-01-07 19:41:51 +01:00
Florian Pelz bbd11199e6
services:·kmscon:·Display·CJK·characters.
Follow-up·to d7d049fdcd.

* gnu/services/base.scm·(kmscon-service-type):·Use·GNU·Unifont,
which bundles CJK glyphs from WenQuanYi and elsewhere.
2022-12-20 11:11:23 +01:00
Ludovic Courtès 12ca767702
Merge branch 'version-1.4.0' 2022-12-19 00:40:33 +01:00
Ludovic Courtès d7d049fdcd
services: kmsconf: Load GNU Freefont.
This provides glyphs for additional fonts such as Amharic that were
otherwise missing.

Fixes <https://issues.guix.gnu.org/60164>.
Reported by Wolf <wolf@wolfsden.cz>.

* gnu/services/base.scm (kmscon-service-type): In 'start' method,
pass #:environment-variables to set 'XDG_DATA_DIRS'.
2022-12-18 13:08:04 +01:00
Ludovic Courtès 302a84a593
Merge branch 'version-1.4.0' 2022-12-12 15:03:35 +01:00
Ludovic Courtès 556520a33c
services: nscd: Use nscd from 'glibc-final' on native builds.
This reduces the closure size of systems by removing one glibc
copy--namely (@ (gnu packages base) glibc) in addition to (@ (gnu
packages commencement) glibc-final).

* gnu/services/base.scm (<nscd-configuration>)[glibc]: Change default
value to use 'let-system' and 'canonical-package' as appropriate.
2022-12-09 16:43:25 +01:00
Ludovic Courtès 156a881001
services: base: Use 'match-record' instead of 'match'.
* gnu/services/base.scm (agetty-shepherd-service)
(mingetty-shepherd-service)
(nscd.conf-file)
(udev-shepherd-service)
(udev-etc)
(gpm-shepherd-service)
(network-set-up/linux)
(network-tear-down/linux)
(static-networking-shepherd-service)
(greetd-agreety-tty-session-command)
(greetd-agreety-tty-xdg-session-command): Use 'match-record' instead of
'match'.
(guix-accounts): Use <guix-configuration> accessors.
(udev-service-type): Use <udev-configuration> accessors.
2022-12-08 13:21:53 +01:00
Ludovic Courtès 9ccc94afb2
services: guix-publish: Keep fewer rotated logs.
* gnu/services/base.scm (%guix-publish-log-rotations): Add 'options'
field.
2022-12-07 23:36:20 +01:00
Ludovic Courtès adfe1064c8
services: base: Use 'match-record' instead of 'match'.
* gnu/services/base.scm (agetty-shepherd-service)
(mingetty-shepherd-service)
(nscd.conf-file)
(udev-shepherd-service)
(udev-etc)
(gpm-shepherd-service)
(network-set-up/linux)
(network-tear-down/linux)
(static-networking-shepherd-service)
(greetd-agreety-tty-session-command)
(greetd-agreety-tty-xdg-session-command): Use 'match-record' instead of
'match'.
(guix-accounts): Use <guix-configuration> accessors.
(udev-service-type): Use <udev-configuration> accessors.
2022-12-02 00:02:13 +01:00
Ludovic Courtès 8d9647d8a7
services: Add Shepherd 'configuration' action to various services.
* gnu/services/avahi.scm (avahi-shepherd-service): Add 'actions' field.
* gnu/services/base.scm (nscd-actions): Add call to
'shepherd-configuration-action'.
* gnu/services/desktop.scm (upower-shepherd-service): Add 'actions'
field.
(elogind-shepherd-service): Likewise.
* gnu/services/dict.scm (dicod-shepherd-service): Likewise.
* gnu/services/networking.scm (openntpd-shepherd-service): Likewise.
(tor-shepherd-service): Likewise.
* gnu/services/ssh.scm (openssh-shepherd-service): Likewise.
* gnu/services/web.scm (nginx-shepherd-service): Likewise.
* gnu/services/xorg.scm (gdm-shepherd-service): Likewise.
* gnu/tests/base.scm (run-basic-test)["nscd configuration action"]: New
test.
* doc/guix.texi (Services): Document it.
2022-11-18 15:44:39 +01:00
( via Guix-patches via fdc9e1b27e
services: greetd: Add gexp compilers for sessions.
* gnu/home/services/base.scm (make-greetd-agreety-session-command,
greetd-wlgreet-sway-session-command, make-greetd-default-session-command):
Remove variables.
(greetd-agreety-session-compiler, greetd-wlgreet-sway-session-compiler): New
gexp compilers.
(greetd-terminal-configuration)[default-session-command]<sanitize>: Remove it.

Signed-off-by: Andrew Tropin <andrew@trop.in>
2022-11-09 11:23:10 +04:00
( ba6ea435e2
gnu: base: Add greetd-wlgreet-sway-session.
* gnu/services/base.scm (greetd-wlgreet-session): New data type.
(greetd-wlgreet-sway-session): Likewise.
* doc/guix.texi ("Base Services")[greetd-service-type]: Document
  them.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-11 11:43:01 +01:00
Brice Waegeneire 45eac6cdf5
services: Add file system utilities to profile.
* gnu/services/base.scm (file-system-type->utilities)
(file-system-utilities): New procedures.
(file-system-service-type): Extend 'profile-service-type' with
'file-system-utilities'.
* gnu/system.scm (boot-file-system-service): New procedure.
(operating-system-default-essential-services): Use it.
(%base-packages): Remove 'e2fsprogs'.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-09-28 19:45:38 -04:00
Hilton Chain 685dd8fb13
services: agetty-service-type: Add missing dash.
* gnu/services/base.scm (<agetty-configuration>): Add missing dash for
no-hostname? configuration.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-08 16:22:23 +02:00
muradm cac3914dfc
gnu: greetd-service-type: Add supplementary groups to greeter.
* gnu/services/base.scm (<greetd-configuration>)
[greeter-supplementary-groups]: New field.
(%greetd-accounts): Rename to...
(greetd-accounts): ... this.  Convert to a function that takes a config
argument.  Use greeter-supplementary-groups.
(greetd-service-type): Adjust accordingly.
* gnu/tests/desktop.scm (%minimal-services): Add test for
greeter-supplementary-groups.
* doc/guix.texi ("Base Services")[greetd-service-type]: Document
greeter-supplementary-groups.
2022-08-26 18:50:33 +02:00
Ludovic Courtès 0483c71cc5
services: root-file-system: Cleanly unmount upon shutdown.
Fixes <https://issues.guix.gnu.org/56209>.
Reported by angry rectangle <angryrectangle@cock.li>.

* gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields.
* gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop'
method, remove 'call-with-blocked-asyncs'.  When 'mount' throws to
'system-error, call (@ (fibers) sleep) and try again.
* gnu/tests/base.scm (run-root-unmount-test): New procedure.
(%test-root-unmount): New variable.
2022-07-01 12:10:28 +02:00
Lars-Dominik Braun d921516f50
services: greetd: Remove unnecessary user groups.
* gnu/services/base.scm (%greetd-accounts): Remove supplementary groups
users, tty, input, audio. Create special user group “greeter”.
2022-06-30 09:20:37 +02:00
muradm 530e0f0260
gnu: base: Add greetd-service-type.
* gnu/services/base.scm (greetd-service-type): New variable
* gnu/services/base.scm (greetd-configuration): New data type
* gnu/services/base.scm (greetd-terminal-configuration): New data type
* gnu/services/base.scm (greetd-agreety-session): New data type
* gnu/services/base.scm (pam-limits-service-type): Should be aware of
greetd PAM service
* gnu/services/pam-mount.scm (pam-mount-pam-service): Should be aware
of greetd PAM service

Signed-off-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>
2022-06-17 10:30:41 +02:00
terramorpha fcad622648
services: guix: Generalize extensions.
* gnu/services/base.scm (<guix-extension>): New record type.
(guix-extension-merge): New procedure.
(guix-service-type): Honor extensions.
* doc/guix.texi (Base Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-13 12:27:35 +02:00
Ludovic Courtès 264ca9452f
services: syslogd: Do not fsync at each line.
Fixes <https://issues.guix.gnu.org/55707>.

Previously Inetutils' syslogd would call 'fsync' after each line written
to a file.  This would significantly increase boot times on machines
with slow-ish spinning HDDs, where each 'fsync' call would take between
0.1s and 0.4s (and we'd do two of them for each line, one for
/var/log/messages and one for /var/log/debug).

* gnu/services/base.scm (%default-syslog.conf): Add a '-' before each
file name, except /var/log/secure.  Change what goes to /var/log/debug.
2022-06-06 22:43:31 +02:00
Kiran Shila 29f62a7f5a
services: pam-limits: Add sudo and sshd.
* gnu/services/base.scm (pam-limits-service-type): Add "sudo" and "sshd"
to the list.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-05 23:35:31 +02:00
Ludovic Courtès 9a5d686923
services: Add more description fields.
* gnu/services.scm (simple-service): Add 'description' field.
* gnu/services/base.scm (udev-rules-service): Likewise.
* gnu/system/install.scm (configuration-template-service-type): Likewise.
* gnu/tests.scm (marionette-service-type): Likewise.
2022-05-18 22:29:54 +02:00
Ludovic Courtès 2a37f174be
services: Make sure Shepherd destructors match constructors.
This is a followup to b06ecc5751,
211fe3f66e, and
fd57ce267c.

* gnu/services/base.scm (guix-publish-shepherd-service): Change 'stop'
method to use 'make-systemd-destructor' when 'make-systemd-constructor'
is used.
* gnu/services/dict.scm (dicod-shepherd-service): Change 'stop' method
to use 'make-inetd-destructor' when 'make-inetd-constructor' is used.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Likewise.
2022-05-02 17:57:30 +02:00
Ludovic Courtès 774f8804ba
gexp: Add 'references-file'.
* gnu/services/base.scm (references-file): Remove.
* guix/gexp.scm (references-file): New procedure.
* tests/gexp.scm ("references-file"): New test.
2022-05-01 21:30:34 +02:00
Ludovic Courtès b06ecc5751
services: guix-publish: Use socket activation when possible.
* gnu/services/base.scm (guix-publish-shepherd-service): Use
'make-systemd-constructor' when it's available and ADVERTISE? is false.
2022-04-29 22:59:08 +02:00
Ludovic Courtès e692dc632c
services: Add 'log-cleanup' service to '%base-services' for build logs.
* gnu/services/base.scm (%base-services): Add 'log-cleanup-service-type'
instance.
* doc/guix.texi (Log Rotation): Add example and mention '%base-services'.
2022-04-04 22:58:03 +02:00
Ludovic Courtès 5e34e873af
services: guix: Add 'generate-substitute-key?' field.
* gnu/services/base.scm (<guix-configuration>)[generate-substitute-key?]:
New field.
(guix-activation): Honor it.
* doc/guix.texi (Base Services): Document it.
2022-03-10 23:46:50 +01:00
Danny Milosavljevic 07c3a43955
agetty-shepherd-service: Rename console agetty to "term-console" for clarity.
* gnu/services/base.scm (agetty-shepherd-service)[provision]: Rename console
agetty to "term-console".
2022-02-25 17:13:55 +01:00
Danny Milosavljevic fcb6cab621
services: %base-services: Adapt agetty-service-type to depend on syslogd
Fixes <https://issues.guix.gnu.org/30464>.

* gnu/services/base.scm (%base-services): Reorder syslog-service for clarity.
[shepherd-requirement]: New field.
2022-02-25 17:13:36 +01:00
Danny Milosavljevic ed17082d94
services: agetty: Add shepherd-requirement.
* gnu/services/base.scm (<agetty-configuration>): Add shepherd-requirement.
* doc/guix.texi (agetty-configuration): Document it.
2022-02-25 17:13:18 +01:00
Maxim Cournoyer e9fa17eb98
services: udev: Use a fixed location for the rules directory and config.
Fixes <https://issues.guix.gnu.org/47681>.

This change adjusts the location of the udev configuration file and rules
directory to a fixed location.  Since udev relies on inotify to discover
change to its rules directory (/etc/udev/rules.d), by using a fixed directory
layout, new udev rules can be automatically picked up without restarting the
service.

* gnu/services/base.scm (udev-rules-union): Build rules output directly
in #$output.
(udev-shepherd-service)[start]: Adjust the UDEV_CONFIG_FILE and
EUDEV_RULES_DIRECTORY environment variables.
[actions]: Remove field.  The 'rules' action is no longer useful.
(udev.conf): New variable.
(udev-etc): New procedure.
(udev-service-type): Extend the etc-service-type with it.
2022-02-20 19:58:14 -05:00
Guillaume Le Vaillant 1aa269d1d7
services: guix-publish: Add negative-ttl parameter.
* gnu/services/base.scm (guix-publish-configuration): Add 'negative-ttl'
  field.
  (guix-publish-sheperd-service): Process it.
* doc/guix.texi (Base Services)[guix-publish-service-type]: Add item for
  negative-ttl.
2022-01-20 14:55:19 +01:00
Ludovic Courtès 575e52ac2b
daemon: Always default to gzip for log compression.
* nix/libstore/globals.cc (Settings::Settings): Have 'logCompression'
default to COMPRESSION_GZIP unconditionally.
* gnu/services/base.scm (<guix-configuration>)[log-compression]: Default
to 'gzip.
* doc/guix.texi (Invoking guix-daemon, Base Services): Adjust accordingly.
2022-01-18 18:46:51 +01:00
Timothy Sample 3b6755defe
services: guix: Add tar and gzip to PATH.
* gnu/services/base.scm (guix-shepherd-service): Add the PATH
environment-variable and populate it with tar and gzip.
2022-01-16 18:57:55 -05:00