Commit graph

1204 commits

Author SHA1 Message Date
Mathieu Othacehe
79f9dee3c4
Use substitute servers on the local network.
* guix/scripts/discover.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/nix-daemon/guix-daemon.cc (options): Add "discover" option,
(parse-opt): parse it,
(main): start "guix discover" process when the option is set.
* guix/scripts/substitute.scm (%local-substitute-urls): New variable,
(substitute-urls): add it.
* gnu/services/base.scm (<guix-configuration>): Add "discover?"
field,
(guix-shepherd-service): honor it.
* doc/guix.texi (Invoking guix-daemon): Document "discover" option,
(Base Services): ditto.
2020-11-29 15:08:26 +01:00
Mathieu Othacehe
276e494b2a
publish: Add advertising support.
* guix/scripts/publish.scm (%options): Add "--advertise" option.
(show-help): Document it.
(service-name): New procedure,
(publish-service-type): new variable.
(run-publish-server): Add "advertise?" and "port" parameters. Use them to publish
the server using Avahi.
(guix-publish): Pass the "advertise?" option to "run-publish-server".
* gnu/services/base.scm (<guix-publish-configuration>): Add "advertise?"
field.
(guix-publish-shepherd-service): Honor it.
2020-11-29 15:08:26 +01:00
Oleg Pykhalov
8518a3692c
services: zabbix-agent: Delete not mandatory hostname configuration.
* gnu/services/monitoring.scm
(zabbix-agent-configuration)[hostname]: Set to empty string.
2020-11-29 16:58:55 +03:00
Marius Bakke
e20388ad7f
services: MySQL: Upgrade database schemas automatically.
* gnu/services/databases.scm (<mysql-configuration>): Add AUTO-UPGRADE? field.
(mysql-upgrade-wrapper, mysql-upgrade-shepherd-service,
mysql-shepherd-services): New variables.
(mysql-service-type): Use MYSQL-SHEPHERD-SERVICES instead of
MYSQL-SHEPHERD-SERVICE.
* doc/guix.texi (Database Services): Document the AUTO-UPGRADE? field of
MYSQL-SERVICE-TYPE.
* gnu/tests/databases.scm (run-mysql-test): Test that mysql_upgrade has run.
2020-11-28 19:51:40 +01:00
Marius Bakke
927bf98e0e
services: MySQL: Make the socket configurable.
* gnu/services/databases.scm (<mysql-configuration>): Add SOCKET field.
(mysql-configuration-file): Adjust accordingly.
* doc/guix.texi (Database Services): Likewise.
2020-11-28 19:51:40 +01:00
Marius Bakke
27d7cdbf87
services: MySQL: Bind to localhost only by default.
* gnu/services/databases.scm (<mysql-configuration>): Add BIND-ADDRESS field.
(mysql-configuration-file): Adjust accordingly.
* doc/guix.texi (Database Services): Document it.
2020-11-28 19:51:40 +01:00
Marius Bakke
89b704a456
services: MySQL: Deprecate 'mysql-service'.
* gnu/services/databases.scm (mysql-service): Define in terms of DEFINE-DEPRECATED.
* gnu/tests/databases.scm (%mysql-os): Adjust accordingly.
* doc/guix.texi (Database Services): Adjust the MariaDB/MySQL section to
document MYSQL-SERVICE-TYPE instead of MYSQL-SERVICE.  While at it, document
the EXTRA-CONTENT field.
2020-11-28 19:51:40 +01:00
Mikhail Tsykalov
788df2ecd6
mapped-devices: Allow target to be list of strings.
* gnu/system/mapped-devices.scm (<mapped-device>): Rename constructor to
%mapped-device.
[target]: Remove field.
[targets]: New field. Adjust users.
(mapped-device-compatibility-helper, mapped-device): New macros.
(mapped-device-target): New deprecated procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-11-26 00:05:39 +01:00
Tobias Geerinckx-Rice
13180f6acc
services: cups: Add Splix by default.
* gnu/services/cups.scm (cups-configuration): Add splix to the default extensions.
* doc/guix.texi (Printing Services): Document it.
2020-11-21 23:00:06 +01:00
Tobias Geerinckx-Rice
0b57c1b09e
gnu: Rename escpr to epson-inkjet-printer-escpr.
‘escpr’ is nice and short, but everyone else calls this package
‘epson-inkjet-printer-escpr’.  More importantly, so does upstream.

* gnu/packages/cups.scm (escpr, epson-inkjet-printer-escpr,): Rename
escpr to epson-inkjet-printer-escpr, redefining escpr as
deprecated-package.  Adjust all users.
2020-11-21 22:59:47 +01:00
Maxim Cournoyer
182ea66f6f
Merge branch 'version-1.2.0' into master. 2020-11-20 09:46:57 -05:00
Marius Bakke
0a47ff9f9f
services: base: Re-export %default-substitute-urls from (guix store).
* gnu/services/base.scm: Export %DEFAULT-SUBSTITUTE-URLS.
2020-11-18 22:37:17 +01:00
Marius Bakke
0ae9bbe4f5
services: SDDM: Wait for elogind before starting.
Fixes <https://bugs.gnu.org/44669>.

* gnu/services/sddm.scm (sddm-shepherd-service)[requirement]: Add elogind.
2020-11-18 22:31:32 +01:00
Tobias Geerinckx-Rice
a45f8223e1
Merge remote-tracking branch 'upstream/version-1.2.0' 2020-11-18 18:07:57 +01:00
Julien Lepiller
5221df3414
gnu: vpn: Make ca, key and cert optional.
* gnu/services/vpn.scm (openvpn-client-configuration)
(openvpn-server-configuration): Make ca, key an cert fields optional.
* doc/guix.texi (VPN Services): Document the change.
2020-11-18 15:05:41 +01:00
Ludovic Courtès
37b98e8cca
services: shepherd: Map all the invalid store characters to dash.
Fixes a regression introduced in
977eb5d023 whereby file system services
would now have a different name.

* gnu/services/base.scm (file-system->shepherd-service-name): Revert
changes introduced in 977eb5d023.
* gnu/services/shepherd.scm (%store-characters): New variable
(shepherd-service-file-name): Map all the characters outside
%STORE-CHARACTERS to #\-.
2020-11-18 11:13:49 +01:00
Danny Milosavljevic
8490fa0253
services: cups: Add some extensions by default.
* gnu/services/cups.scm (cups-configuration): Add some extensions by default.
doc/guix.texi (Printing Services): Document the default value.
2020-11-18 10:00:11 +01:00
Maxim Cournoyer
129b9b16d9
Merge remote-tracking branch 'origin/version-1.2.0' into master
Conflicts:
	gnu/packages/bioinformatics.scm

The python-pysam package fixed in master was kept instead of the update done
in the version-1.2.0 branch.
2020-11-17 18:00:28 -05:00
Marius Bakke
6cad3f6966
services: mingetty: Export configuration accessors.
* gnu/services/base: Export configuration accessors for mingetty.
2020-11-16 19:08:36 +01:00
Ludovic Courtès
977eb5d023
Properly deal with build directories containing '~'.
Fixes <https://bugs.gnu.org/44626>.
Reported by Vagrant Cascadian <vagrant@debian.org>.

* tests/build-utils.scm ("wrap-script, simple case"): Pass
SCRIPT-CONTENTS to 'display' rather than 'format'.
* gnu/services/base.scm (file-system->shepherd-service-name)
[valid-characters, mount-point]: New variables.
Filter out invalid store file name characters from the mount point of
FILE-SYSTEM.
2020-11-16 11:21:42 +01:00
Alexandru-Sergiu Marton
149dd51d2f
services: gmnisrv: Export procedures and service type.
* gnu/services/web.scm: Export gmnisrv-configuration, gmnisrv-configuration?,
gmnisrv-configuration-package, gmnisrv-configuration-config-file,
gmnisrv-service-type.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2020-11-14 11:32:40 +00:00
Ludovic Courtès
07914def98
Merge branch 'version-1.2.0' 2020-11-12 10:47:25 +01:00
Mark H Weaver
e3ae313478
gnu: mingetty-shepherd-service: Make 'clear-on-logout' configurable.
Also change the default configuration to clear on logout, which is the
upstream default.

* gnu/services/base.scm (<mingetty-configuration>): Add 'clear-on-logout?'
field.
(mingetty-shepherd-service): Pass the "--noclear" option to mingetty only if
'clear-on-logout?' is #false.
* doc/guix.texi (Base Services): Document the 'clear-on-logout?' field.
2020-11-11 00:21:22 -05:00
Julien Lepiller
86e9e5cb23
services: nginx: Re-introduce server-names-hash-bucket-size.
This was unintentionally removed in
00014f7692.

* gnu/services/web.scm (default-nginx-config): Re-introduce processing
of server-names-hash-bucket-size option.
2020-11-09 22:53:50 +01:00
Julien Lepiller
acb9f7849f
services: nginx: Re-introduce server-names-hash-bucket-size.
This was unintentionally removed in
00014f7692.

* gnu/services/web.scm (default-nginx-config): Re-introduce processing
of server-names-hash-bucket-size option.
2020-11-09 22:48:02 +01:00
Christopher Baines
f9000450b5
services: guix: Fix Guix Build Coordinator substitute urls bug.
* gnu/services/guix.scm (guix-build-coordinator-agent-shepherd-services): Pass
the correct value as the --non-derivation-substitute-urls.
2020-11-07 20:52:33 +00:00
Christopher Baines
18bb73c695
services: guix: Remove the Guix Build Coordinator agent pid file.
As it doesn't use one.

* gnu/services/guix.scm (guix-build-coordinator-agent-shepherd-services):
Remove #:pid-file.
(guix-build-coordinator-agent-activation): Don't create the /var/run
directory.
2020-11-07 20:50:22 +00:00
Christopher Baines
b6ece1c206
services: guix: Add guix-build-coordinator-agent cache directory.
As this is needed when substituting derivations.

* gnu/services/guix.scm (guix-build-coordinator-agent-shepherd-services): Set
XDG_CACHE_HOME.
(guix-build-coordinator-agent-activation): Create
/var/cache/guix-build-coordinator-agent.
2020-11-07 20:09:44 +00:00
Ludovic Courtès
bb124f6e9c
services: mpd: Fix daemon startup.
Until now it would wait for a PID file that'd never come.

* gnu/services/audio.scm (mpd-shepherd-service): Add 'requirement'.
Remove #:pid-file from 'start'.
(mpd-service-activation): Create the ".mpd" directory since that's what
the daemon expects.
2020-11-06 23:10:18 +01:00
Ludovic Courtès
7209d7cbc3
services: mpd: Always create the "mpd" user account.
* gnu/services/audio.scm (%mpd-accounts): New variable.
(mpd-service-type)[extensions]: Add ACCOUNT-SERVICE-TYPE extension.
2020-11-06 22:59:19 +01:00
Maxim Cournoyer
0c5d0c57d3
services: mpd: Do not eagerly look for a user.
Running 'guix system search mpd' would throw a backtrace because the
mpd-shepherd-service service start Gexp contained an unquoted call to
'getpwnam', which would look for a missing 'mpd' user and fail.

* gnu/services/audio.scm (mpd-shepherd-service): gexp-unquote only the
relevant variable rather than the whole expression.
2020-11-06 08:54:27 -05:00
raingloom
fe1cd098d2
services: Add yggdrasil-service-type.
* gnu/services/networking.scm (yggdrasil-configuration)
(yggdrasil-configuration?, yggdrasil-configuration-package)
(yggdrasil-configuration-auto-conf, yggdrasil-configuration-log-level)
(yggdrasil-configuration-log-to): New procedures.
(yggdrasil-service-type): New variable.
* doc/guix.texi: Document it.
* gnu/system/examples/yggdrasil.tmpl: Provide example.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2020-11-05 18:45:40 +01:00
Ludovic Courtès
a4e7749e91
services: Remove imports of (ice-9 …) modules.
* gnu/services/monitoring.scm (zabbix-server-activation): Remove (ice-9
rdelim) from the imported modules.
(zabbix-agent-activation): Likewise.
* gnu/tests/mail.scm (run-exim-test)[test]: Remove (ice-9 ftw) from the
imported modules.
2020-11-05 16:13:50 +01:00
Ludovic Courtès
f7d0a63dda
services: guix: Do not embed the host (guix config).
Fixes a bug whereby different users would get different derivations for
the same service.

* gnu/services/base.scm (guix-shepherd-service): In 'start' method, do
not embed (guix config).
2020-11-05 00:07:45 +01:00
Ludovic Courtès
2b2ab7796a
services: guix-publish: Add 'cache-bypass-threshold' field.
This is a followup to ecaa102a58.

* gnu/services/base.scm (<guix-publish-configuration>)[cache-bypass-threshold]:
New field.
(guix-publish-shepherd-service): Honor it.
2020-10-30 12:31:18 +01:00
Ludovic Courtès
81c3dd9cad
services: swap: Allow for UUIDs and file system labels.
* gnu/services/base.scm (swap-service-type)[device-lookup, device-name]:
New variables.
Add 'modules' field to 'shepherd-service'.  In 'start' and 'stop', use
'device-lookup' to resolve UUIDs and labels.
* doc/guix.texi (operating-system Reference): Adjust accordingly.
2020-10-30 01:14:21 +01:00
Vagrant Cascadian
7db4dc6004
gnu: ganeti-luxid-service-type: Fix typo.
* gnu/services/ganeti (ganeti-luxid-service-type)[description]: Fix spelling
  of "authoritative".
2020-10-28 21:10:54 -07:00
Simon South
5ede259526
services: knot-resolver: Replace deprecated command-line option.
This silences a warning from the service at startup.

* gnu/services/dns.scm (knot-resolver-shepherd-services)[start]: Use the "-n"
command-line option to kresd in place of the deprecated "-f 1".

Signed-off-by: Leo Famulari <leo@famulari.name>
2020-10-27 18:42:39 -04:00
Alexandru-Sergiu Marton
2ade5bdeb8
services: Add gmnisrv web service.
* gnu/services/web.scm (<gmnisrv-configuration>): New record type.
(%default-gmnisrv-config-file): New variable.
(%gmnisrv-accounts, %gmnisrv-activation): New variables.
(gmnisrv-shepherd-service): New procedure.
(gmnisrv-service-type): New variable.
* doc/guix.texi (Web Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-10-27 18:00:28 +01:00
Ludovic Courtès
e86c2f058a
services: hpcguix-web: Set 'XDG_CACHE_HOME' to a writable directory.
* gnu/services/web.scm (hpcguix-web-shepherd-service): Change
XDG_CACHE_HOME to /var/cache/guix/web.  Previously, the authentication
code would try to write to /var/cache/guix/authentication, which would
fail.
2020-10-27 18:00:28 +01:00
Ludovic Courtès
3b6e4e5fd0
services: guix: Make /etc/guix/acl really declarative by default.
Fixes <https://bugs.gnu.org/39819>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* gnu/services/base.scm (substitute-key-authorization): Symlink
DEFAULT-ACL to /etc/guix/acl unconditionally.  Add code to optionally
back up /etc/guix/acl if it was possibly modified by hand.
* doc/guix.texi (Base Services): Clarify the effect of setting
'authorize-keys?' to true.  Mention the backup.  Give an example showing
how to authorize substitutes from another server.
2020-10-25 01:06:10 +02:00
Christopher Baines
b0d6098f03
gnu: guix-build-coordinator: Propagate the guile inputs.
This means the package is usable as a library, which is useful when using the
procedures to send requests to the Guix Build Coordinator.

* gnu/packages/package-management.scm (guix-build-coordinator)[inputs]: Move
guile inputs to propagated inputs.
[propagated-inputs]: Receive some inputs.
* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Adjust the
start script to include propagated inputs.
2020-10-23 15:40:10 +01:00
Christopher Baines
4b8acf715d
services: guix: Fix the guix-build-coordinator metrics namespace.
The underscore is now handled in the guile prometheus library.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Remove the
underscore from the end of the metrics namespace.
2020-10-23 15:40:10 +01:00
Christopher Baines
bdaaa6b3e4
services: guix-build-coordinator: Configure output buffering.
Otherwise the logging is garbled.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Configure
line output buffering for stdout and stderr.
2020-10-23 15:40:10 +01:00
Christopher Baines
ced9da901f
services: guix-build-coordinator: Include the system profile in PATH.
As this allows hooks to use the system profile, if that's desired.

* gnu/services/guix.scm (guix-build-coordinator-shepherd-services): Set PATH
to include the system profile.
2020-10-23 15:40:09 +01:00
Christopher Baines
b9f8ce17e4
services: guix-build-coordinator: Output the start script name.
As this can be useful for debugging purposes.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Output the
current filename.
2020-10-23 15:40:09 +01:00
Christopher Baines
b34ac307e3
services: guix: Fix hooks gexp issue for the Guix Build Coordinator.
* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Fix
handling the name within the hook gexp.
2020-10-23 15:40:09 +01:00
Christopher Baines
bdcf4d88d5
services: databases: Don't specify a default postgresql version.
Currently, if the postgresql package major version changes, this is going to
break the service upon upgrade, because PostgreSQL will reject the data files
from the differing major version of the service.

Because it's important to either keep running a particular major version, or
intentionally upgrade, I think the configuration would be better with no
default. I think this is also going to be helpful when trying to assist users
upgrading PostgreSQL.

* gnu/services/databases.scm (<postgresql-configuration>): Remove default for
postgresql.
(postgresql-service-type): Remove the default value.
* gnu/tests/databases.scm (%postgresql-os): Update accordingly.
* gnu/tests/guix.scm (%guix-data-service-os): Update accordingly.
* gnu/tests/monitoring.scm (%zabbix-os): Update accordingly.
* gnu/tests/web.scm (patchwork-os): Update accordingly.
* doc/guix.texi (PostgreSQL): Update accordingly.
2020-10-20 22:39:43 +01:00
Christopher Baines
a698df72d3
services: databases: Deprecate the postgresql-service procedure.
Using the service type directly is a better approach, making it easier to
configure the service.

* gnu/services/databases.scm (postgresql-service): Deprecate this procedure.
* doc/guix.texi (PostgreSQL): Update the documentation for the use of (service
postgresql-service-type).
2020-10-20 22:39:43 +01:00
Mathieu Othacehe
922a50993e
services: guix: Fix coordinator agent.
* gnu/services/guix.scm (guix-build-coordinator-agent-activation): Define
%user variable.
2020-10-20 09:18:04 +02:00