me
/
guix
Archived
1
0
Fork 0
Commit Graph

2023 Commits (3db1a8341c815af3673c367518fbb193f5592864)

Author SHA1 Message Date
Ludovic Courtès da9f509b03
services: guix: Use Shepherd 0.10 API for actions.
The ‘action’ method was deprecated in Shepherd 0.10.0.

* gnu/services/base.scm (shepherd-set-http-proxy-action)
(shepherd-discover-action): Use ‘perform-service-action’ instead of the
now-deprecated ‘action’ method.

Change-Id: Ibe1c79a44148596292c2c8907011ec787f8a9ddd
2024-05-05 12:06:23 +02:00
Ian Eure ef8ab6ab66
gnu: guix-configuration: Improve offload build-machines.
It’s currently difficult to programmatically add a build-machine, because the
`service-extension' mechanism is the only facility which can do that.  It
relies on the `guix-service-type', ala:

    (service-extension guix-service-type
      (guix-extension (build-machines (list ...))))

...but `guix-service-type' is already instantiated as part of
`%base-services', and replacing it may lose other configuration, like
substitute servers and authorized keys.

Additionally, a default value of `#f' for the build-machines field requires
guarding uses of the field with:

    (or (guix-build-machines config) '())

Changing the default to be the empty list avoids that.  One can now add
build-machines with code such as:

    (modify-services %base-services
      (guix-service-type
       config =>
       (guix-configuration
        (inherit config)
        (authorized-keys
         (cons %build-machine-key
               (guix-configuration-authorized-keys config)))
        (build-machines (cons #~(build-machine ...)
                              (guix-configuration-build-machines config))))))

* gnu/services/base.scm (guix-configuration): Rename `guix-build-machines' to
`guix-configuration-build-machines' and export it.  Change the default from
`#f' to the empty list.
* gnu/services/base.scm (guix-activation): Update the build-machines test and
reverse the conditions.

Change-Id: I6780c6a5579fd9d4b4f22ee2b2bf7ba7a0454407
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-04 19:14:27 +02:00
Ahmad Draidi 7d9ad8f3a6
services: cuirass: Remove use-substitutes? configuration option.
As of Cuirass commit 9a1452ee021c9f773424961cfeef47ca0b7c5c5a, this option
seems to be unused and kept for back compatibility there.

* gnu/services/cuirass.scm (<cuirass-configuration>): Remove use-substitutes?
field.
(cuirass-shepherd-service): Remove the option.
* doc/guix.texi (Continuous Integration): Remove option documentation.

Change-Id: I933550ce76eecdf918b07891aa8212fd30a7c87e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-04 19:14:25 +02:00
Ahmad Draidi 70f277d0e4
services: cuirass: Add new configuration options.
* gnu/services/cuirass.scm (<cuirass-configuration>): Add ttl and threads
fields.
(cuirass-shepherd-service): Handle the new options.
* doc/guix.texi (Continuous Integration): Document them.

Change-Id: I4387fbd7bf6766f4a54801f35c7ed82ce4eb9645
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-04 19:14:25 +02:00
Ahmad Draidi 2cd6831161
services: cuirass: Use separate extra options for cuirass web process.
Currently, "extra-options" is passed to both "cuirass register" and "cuirass
web" processes. This makes it impractical since the extra parameters have to
be intended for and supported by both processes.

* gnu/services/cuirass.scm (<cuirass-configuration>): Add a web-extra-options
field.
(cuirass-shepherd-service): Replace extra-options with web-extra-options for
cuirass web.
* doc/guix.texi (Continuous Integration): Document the changes.

Change-Id: Iba79c559ea8267aaf8f25248f3d18ed7b352cb60
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-04 19:14:25 +02:00
Ludovic Courtès fb61323dba
services: build-vm: Provide only one locale.
* gnu/services/virtualization.scm (%virtual-build-machine-operating-system)
[locale, locale-definitions]: New fields.

Change-Id: Ieb24b3a0c210291d8c04412e4c263b5e377b5704
2024-04-29 22:52:08 +02:00
宋文武 3bd8d238ab
services: Add gvfs-service-type.
* gnu/services/desktop.scm (gvfs-service-type): New variable.
(gvfs-configuration, make-gvfs-configuration, gvfs-configuration?,
gvfs-package): New procedures.
(<gvfs-configuration>): New record.
* doc/guix.texi (Desktop Services): Document it.

Change-Id: I584819500e2ce7d2b14e57dac238a96e9888e75e
2024-04-29 08:54:36 +08:00
Ludovic Courtès 72432080ad
services: gdm: Use ‘make-forkexec-constructor’.
* gnu/services/xorg.scm (gdm-shepherd-service): Use
‘make-forkexec-constructor’ directly.

Change-Id: I4ede4c99996cea4421316411cf8d887d70ce4253
2024-04-28 23:41:50 +02:00
Ludovic Courtès ae36d514aa
services: lightdm: Use ‘make-forkexec-constructor’.
* gnu/services/lightdm.scm (lightdm-shepherd-service)[start]: Use
‘make-forkexec-constructor’ directly.

Change-Id: Iaaa8dcde123ea80ce63c09033b681e40ccc589a4
2024-04-28 23:37:24 +02:00
Richard Sent 59bb53823e
services: Add the Guix Home service.
This patch adds a Guix Home service, which allows for configuring/deploying an
operating-system declaration with an associated home-environment.

* gnu/services/guix.scm: Add guix-home-service and guix-home-shepherd-service
* gnu/home/services/shepherd.scm: Don't attempt to launch user shepherd when
the system shepherd runs guix-home-<user>
* doc/guix.texi: Add documentation for guix-home-service
* gnu/tests/guix.scm: Add a test to verify guix-home-service-type is able to
activate a home environment

Change-Id: Ifbcc0878d934aa4abe34bb2123b5081fb432aa8e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-04-17 12:13:03 +02:00
Ludovic Courtès 91e1a457b5
services: guix: Gracefully handle dangling symlink for ‘machines.scm’.
Previously, if /etc/guix/machines.scm was a dangling symlink, it would
be kept (because ‘file-exists?’ would return #f) and thus the following
‘symlink’ call would throw with EEXIST.

* gnu/services/base.scm (guix-machines-files-installation): Use ‘lstat’
rather than ‘file-exists?’.

Change-Id: I07c7eed842dacabbd19ae2a17ac3e59cf26e46b2
2024-04-06 15:14:58 +02:00
Liliana Marie Prikler a915a57d91
Merge branch 'gnome-team' 2024-03-30 09:47:43 +01:00
Ludovic Courtès 6b138626e4
services: postgresql: Simplify execution of ‘initdb’.
* gnu/services/databases.scm (postgresql-activation): Replace
‘primitive-exit’ + ‘system*’ with ‘execl’.

Change-Id: I491fd3093f67af59f240438d7d6123e769e4ec1e
2024-03-30 01:01:32 +01:00
Robert Vollmert ed03a0aa9b
services: postgresql: Don't initdb when directory exists.
* gnu/services/databases.scm (postgresql-activation): Check if
directory exists.

Reviewed-by: Dale Mellor <guix-devel-0brg6b@rdmp.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: Id563a3e8df2cb5b805e64cd8319303c65d308c69
2024-03-30 01:01:32 +01:00
Christopher Baines b538c1d7b9
services: nar-herder: Add new configuration options.
* gnu/services/guix.scm (nar-herder-configuration-new-ttl,
nar-herder-cached-compression-configuration-unused-removal-duration,
nar-herder-cached-compression-configuration-ttl,
nar-herder-cached-compression-configuration-new-ttl): New procedure.
(nar-herder-shepherd-services): Handle the new options.
* doc/guix.texi (Guix Services): Document the new nar-herder options.

Change-Id: I161e490221a3ce394e32ada685dca27df60638bb
2024-03-25 20:40:22 +00:00
Antero Mejr 883e69cdfd
services: guix: Add ‘channels’ field.
* doc/guix.texi (Base Services): Document
'guix-configuration-channels' field.
(Invoking guix pull): Add cross-reference.
* gnu/services/base.scm (install-channels-file): New procedure.
(guix-configuration): Add channels field.
(guix-activation): Use 'install-channels-file' procedure.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I4d89235bf0bc6dde69984138ccb894b48ace9d76
2024-03-22 11:40:32 +01:00
Ludovic Courtès a2077e5bee
services: guix-publish: Use ‘make-systemd-constructor’ unconditionally.
The #:lazy-start? parameter was added in the Shepherd 0.10.0, which is
required since commit 477d4f7d24.

* gnu/services/base.scm (guix-publish-shepherd-service): Use
‘make-systemd-constructor’ unconditionally and pass #:lazy-start?.

Change-Id: I95aa079732cd21e32091c7deea2ed2f1bc50f2f2
2024-03-21 17:43:16 +01:00
Ludovic Courtès 6f9d844d2e
services: shepherd: Load each service file in a fresh module.
Fixes <https://issues.guix.gnu.org/67649>.

* gnu/home/services/shepherd.scm (home-shepherd-configuration-file)[config]:
Define ‘make-user-module’.  Call ‘load’ in ‘save-module-excursion’.
* gnu/services/shepherd.scm (shepherd-configuration-file): Likewise.

Reported-by: Attila Lendvai <attila@lendvai.name>
Change-Id: I7df11c81b5bbbf2b24a8daa02502a000e0826fe0
2024-03-21 17:43:15 +01:00
Christopher Baines 8fa0761264
Merge remote-tracking branch 'savannah/master' into gnome-team
Change-Id: Iec8e15b79c6fde516294c2bfcaf8ee3575b1f745
2024-03-20 14:54:26 +00:00
Zheng Junjie 3ea55fada0
services: sddm: Add extension for localed-service-type.
* gnu/services/sddm.scm (sddm-service-type): Add extension for
localed-service-type.
* gnu/services/xorg.scm (xorg-configuration-keyboard-layout): Export it.

Change-Id: I26e6475b733d69f1baf00786e302a3ec6d3c4a74
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2024-03-19 18:52:16 +08:00
Carlo Zancanaro d25620be4c
gnu: services: Add insecure-sasl-mechanisms to prosody configuration.
* gnu/services/messaging.scm (prosody-configuration): Add
insecure-sasl-mechanisms configuration option.
* doc/guix.texi (Messaging Services): Document it.

Change-Id: I8d9e42476ea8ad2f89b143ed4a66b4798e418586
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2024-03-17 12:53:21 +01:00
Liliana Marie Prikler 2ee5451319
Merge branch 'master' into gnome-team 2024-03-10 00:05:58 +01:00
Ludovic Courtès 9e3061a163
services: virtual-build-machine: Disable substitutes by default.
These are useless when offloading yet were causing problems on systems
where the default substitute servers are unreachable.

* gnu/services/virtualization.scm (%virtual-build-machine-operating-system):
Add ‘use-substitutes?’ field to ‘guix-configuration’.

Change-Id: I7d5e380a6f2e2d537de43fdb3c550958ed4db255
2024-03-06 23:25:51 +01:00
Liliana Marie Prikler 7bf4ce4582
Merge branch 'master' into gnome-team 2024-02-25 10:28:03 +01:00
Vivien Kraus 06d01c610e
services: gdm: Enable wayland by default.
* gnu/services/xorg.scm (<gdm-configuration>): Change the default value for
wayland? from '#f' to '#t'.

Change-Id: Ic966dfc462b1140894aa6c38c23e229d6252d340
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2024-02-24 06:36:24 +01:00
Liliana Marie Prikler 96634bb878
services: desktop: Remove unused imports.
These imports were needed for a short time to consider two variants of finding
udev/polkit configuration files.  They are no longer needed, since the
respective procedures use all packages now.

* gnu/services/desktop.scm: Strip use of (guix diagnostics) and (srfi srfi-35).
2024-02-23 21:55:44 +01:00
Liliana Marie Prikler acaa89ae42
services: Extend polkit capabilities of gnome-desktop-service.
As with our udev extension, this makes it so that all inputs are considered
modulo a new ignorelist.

* gnu/services/desktop.scm (gnome-desktop-configuration): Add
polkit-ignorelist.
(gnome-polkit-settings): Adjust accordingly.
2024-02-23 21:55:44 +01:00
Vivien Kraus 07bfe15383
services: Extend udev capabilities of gnome-desktop-service.
Our udev service is capable of handling both rules and hardware databases.
This patch makes it so that gnome can install any such needed rules or
databases, while also allowing users to supply a list of names to ignore
(via regular expressions).

* gnu/services/desktop.scm (gnome-desktop-configuration): Add udev-ignorelist.
(gnome-udev-resources): Rename to…
(gnome-udev-configuration-files): … this.  Account for udev-ignorelist.
(gnome-desktop-service-type): Adjust accordingly.

Change-Id: I6df4b896652581c42a35ea3ba1e4849ad72d12ef
2024-02-23 21:55:44 +01:00
Liliana Marie Prikler 523f3def65
services: Modularise gnome-desktop-configuration.
* gnu/services/gnome.scm (extract-propagated-inputs): New variable.
(gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’,
and ‘extra-packages’.  Deprecate ‘gnome’.
(gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell)
(gnome-desktop-configuration-utilities)
(gnome-desktop-configuration-extra-packages): Export publicly.
(gnome-udev-rules, gnome-polkit-settings): Adjust accordingly.
(gnome-profile): New variable.
(gnome-desktop-service-type): Adjust accordingly.
2024-02-23 21:55:43 +01:00
Miguel Ángel Moreno 0a7bf792c8
services: Add whoogle-service-type.
* gnu/services/web.scm (whoogle-service-type): New variable.
* doc/guix.texi (Web Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-02-20 10:57:16 +01:00
Ludovic Courtès 1cff19d8d4
services: virtual-build-machine: Add ‘configuration’ action.
* gnu/services/virtualization.scm (build-vm-shepherd-services): Add
‘configuration’ action.
* doc/guix.texi (Virtualization Services): Document it.

Change-Id: I4734e096d744b3cda0d523692498a73c0029e188
2024-02-18 15:34:43 +01:00
Ludovic Courtès cd0dc17e43
services: virtual-build-machine: Add periodic GC job.
* gnu/services/virtualization.scm (%virtual-build-machine-operating-system):
Add ‘periodic-gc’ service.

Change-Id: Id5bde1ee3f8e1e549e231375e776d3201ec9e0b5
2024-02-18 15:34:43 +01:00
Ludovic Courtès 492b3a0c31
services: virtual-build-machine: Use a non-volatile root file system.
This is a followup to e0ade40c2b, which
didn’t have the desired effect.

* gnu/services/virtualization.scm (virtual-build-machine-default-image):
Add ‘volatile-root?’ field.

Change-Id: I1a622f22cdd0f8f83860a6eb4a852518db3b46b7
2024-02-18 15:34:43 +01:00
Ludovic Courtès 4aa2dccd4e
services: virtual-build-machine: Do not offload when service is stopped.
* gnu/services/virtualization.scm (check-vm-availability): Check the
value of ‘live-service-running’.

Change-Id: Iba858ea0fa417d9276e026b72b4b78791932482e
2024-02-18 15:34:42 +01:00
Ludovic Courtès c1d37d0653
services: block-facebook-hosts: Use proper unroutable addresses.
This is safer and more appropriate than redirecting to localhost.

* gnu/services/networking.scm (%unroutable-ipv4, %unroutable-ipv6): New
variables.
(facebook-host-aliases): Use them.

Change-Id: Idd4b1fec903c52d542d177a52fec1814eded4119
2024-02-18 15:34:42 +01:00
Liliana Marie Prikler 622df12ef3
Merge branch 'master' into gnome-team 2024-02-13 16:11:14 +01:00
Ludovic Courtès e0ade40c2b
services: virtual-build-machine: Use a larger partition by default.
So far the partition had too little free space.

* gnu/services/virtualization.scm (%default-virtual-build-machine-image-size):
New variable.
(virtual-build-machine-default-image): Define ‘partitions’ field.

Change-Id: Iffe0f316eecad8754d29f8c811cdc4836a818a3f
2024-02-12 12:03:52 +01:00
Ludovic Courtès 15fd5d6c3f
services: virtual-build-machine: Add base file systems to default OS.
This provides /dev/pts and other things that are important for
builds (for example, Python 2.x has ‘openpty’ unit tests that can only
succeed when /dev/pts is available.)

* gnu/services/virtualization.scm (%virtual-build-machine-operating-system)
[file-systems]: Add %BASE-FILE-SYSTEMS.

Change-Id: I7d12a4cb491e957bf55e6c5f9dd09c013473ca42
2024-02-12 12:03:52 +01:00
Ludovic Courtès 9edbb2d7a4
services: Add ‘virtual-build-machine’ service.
* gnu/services/virtualization.scm (<virtual-build-machine>): New record type.
(%build-vm-ssh-port, %build-vm-secrets-port, %x86-64-intel-cpu-models):
New variables.
(qemu-cpu-model-for-date, virtual-build-machine-ssh-port)
(virtual-build-machine-secrets-port): New procedures.
(%minimal-vm-syslog-config, %virtual-build-machine-operating-system):
New variables.
(virtual-build-machine-default-image):
(virtual-build-machine-account-name)
(virtual-build-machine-accounts)
(build-vm-shepherd-services)
(initialize-build-vm-substitutes)
(build-vm-activation)
(virtual-build-machine-offloading-ssh-key)
(virtual-build-machine-activation)
(virtual-build-machine-secret-root)
(check-vm-availability)
(build-vm-guix-extension): New procedures.
(initialize-hurd-vm-substitutes): Remove.
(hurd-vm-activation): Rewrite in terms of ‘build-vm-activation’.
* gnu/system/vm.scm (linux-image-startup-command): New procedure.
(operating-system-for-image): Export.
* gnu/tests/virtualization.scm (run-command-over-ssh): New procedure,
extracted from…
(run-childhurd-test): … here.
[test]: Adjust accordingly.
(%build-vm-os): New variable.
(run-build-vm-test): New procedure.
(%test-build-vm): New variable.
* doc/guix.texi (Virtualization Services)[Virtual Build Machines]: New
section.
(Build Environment Setup): Add cross-reference.

Change-Id: I0a47652a583062314020325aedb654f11cb2499c
2024-02-10 23:21:07 +01:00
Ludovic Courtès f331a667d3
services: secret-service: Make the endpoint configurable.
Until now, the secret service had a hard-coded TCP endpoint on port
1004.  This change lets users specify arbitrary socket addresses.

* gnu/build/secret-service.scm (socket-address->string): New procedure,
taken from Shepherd.
(secret-service-send-secrets): Replace ‘port’ by ‘address’ and adjust
accordingly.
(secret-service-receive-secrets): Likewise.
* gnu/services/virtualization.scm (secret-service-shepherd-services):
Likewise.
(secret-service-operating-system): Add optional ‘address’ parameter and
honor it.  Adjust ‘start’ method accordingly.

Change-Id: I87a9514f1c170dca756ce76083d7182c6ebf6578
2024-02-10 22:59:43 +01:00
Hilton Chain b896b9102b
services: kernel-module-lodaer: Add udev requirement.
Otherwise, modules will be loaded before udev starts, and load events won't be
handled.

* gnu/services/linux.scm (kernel-module-loader-shepherd-service)[requirement]:
Add 'udev.

Change-Id: Ib65028978f96012604b54b27a56501d4388b0f34
2024-02-05 14:04:15 +08:00
Liliana Marie Prikler e6c847defb
Merge branch 'master' into gnome-team 2024-02-03 14:39:49 +01:00
Carlo Zancanaro 023c3e0ac4
services: certbot: Add one-shot service to renew certificates.
* gnu/services/certbot.scm (certbot-renewal-one-shot): New procedure.
(certbot-service-type)[extensions]: Add it to shepherd-root extension.
(certbot-command): Make connection errors return a different exit code.
(certbot-activation): Remove message with certificate renewal instructions.

Change-Id: I614ac6214a753dba0396e2385a75926c8355caa1
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2024-01-31 16:54:19 +01:00
Carlo Zancanaro d4a4b12f0a
services: certbot: Reload nginx in deploy hook.
* gnu/services/certbot.scm (certbot-deploy-hook): Reload nginx.
* doc/guix.texi (Certificate services): Remove deploy-hook from example.

Change-Id: Ibb10481170a6fda7df72492072b939dd6a6ad176
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2024-01-31 16:54:16 +01:00
Carlo Zancanaro fc0ec9a3cc
services: certbot: Create self-signed certificates before certbot runs.
* gnu/services/certbot.scm (<certificate-configuration>): Add
start-self-signed? field.
(generate-certificate-gexp): New procedure.
(certbot-activation): Generate self-signed certificates when
start-self-signed? is #t.
* doc/guix.texi (Certificate services): Document start-self-signed?.

Change-Id: Icfd85ae0c3e29324acbcde6ba283546cf0e27a1d
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2024-01-31 16:54:12 +01:00
Carlo Zancanaro a2b1ef903b
services: certbot: Symlink certificates to /etc/certs.
* gnu/services/certbot.scm (certbot-deploy-hook): New procedure.
(certbot-command): Pass new deploy hook to certbot.
* doc/guix.texi: Replace "letsencrypt/live" with "certs" throughout, except in
the certbot deploy-hook description.

Change-Id: I2ba5e4903d1e293e566b732a84b07d5a134b697d
Signed-off-by: Clément Lassieur <clement@lassieur.org>
2024-01-31 16:54:03 +01:00
Attila Lendvai dde76db33f
services: shepherd: Add respawn-limit and respawn-delay.
* gnu/services/shepherd.scm (<shepherd-service>): Add respawn-limit and
respawn-delay.
(shepherd-service-file): Emit the two values into the shepherd service
constructor form.

Change-Id: I54408e8fb4bcc0956d9610771bf5c566fdc2914c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-28 22:50:49 +01:00
Ludovic Courtès 96c2186a08
services: cuirass: Depend on ‘user-processes’.
* gnu/services/cuirass.scm (cuirass-shepherd-service)
(cuirass-remote-worker-shepherd-service): Add ‘user-processes’ to the
‘requirement’ field.

Change-Id: Iba087bfd8aaa9b1ef54bcc77d855adc136e18644
2024-01-24 23:28:38 +01:00
Ludovic Courtès 94abfccde9
services: cuirass: Add ‘configuration’ action.
* gnu/services/cuirass.scm (cuirass-shepherd-service): Add ‘actions’
field to ‘cuirass’ Shepherd service.

Change-Id: I7feaeebcb89fcd9a1fdbc63f0337e0d63b697793
2024-01-24 23:28:37 +01:00
muradm 1bdeec5d66
services: connman: Add 'connman-general-configuration'.
Currently connman has no main.conf as specified in 'man 5 connman.conf' which
would allow setting NetworkInterfaceBalcklist and other useful options.

This patch adds connman-general-configuration, serializes it and
passes to connmad with --config= flag.

All configuration fields are 'maybe-*' deliberately, to not disturb current
users and not require supporting configuration changes for connmand.

* gnu/services/networking.scm (<connman-general-configuration>): New
configuration record to represent main.conf for connmand.
(<connman-configuration>)[general-configuration]: New field.
(connman-shepherd-service): Honor it.
*doc/guix.texi (Networking Services): Add generated configuration.

Change-Id: I5d78f49e8b2d5e0b3cbd7b8b604e8a254b6397e8
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2024-01-22 09:51:32 -05:00