~ruther/guix-local

ref: 87ffb3d3fbcc9273cb77f22e153ed31a70e2da11 guix-local/gnu/services d---------
00a28bc4 — Bruno Victal 2 years ago
services: configuration: Add some commonly used predicates.

* gnu/services/configuration.scm (list-of-packages?, list-of-symbols?): New
predicate.
* gnu/services/audio.scm (list-of-symbol?): Remove.
* gnu/services/telephony.scm (string-list?): Remove.
(serialize-string-list): Rename to …
(serialize-list-of-strings): … this.
(account-fingerprint-list?, jami-account-list?): Use list-of.
* doc/guix.texi: Update it.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
dd65564d — Bruno Victal 2 years ago
services: fstrim-service-type: Serialize with SRFI-171 transducers.

* gnu/services/linux.scm (serialize-fstrim-configuration): Refactor to use
base-transducer.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
a7994ed5 — Bruno Victal 2 years ago
services: configuration: Use transducers within serialize-configuration.

Introduces 'base-transducer', a SRFI-171 based transducer that can be used as a
starting point for writing custom configuration record serializing procedures.

This also fixes the symbol maybe-value serialization test case.

* gnu/services/configuration.scm (empty-serializer?): New predicate.
(base-transducer, tfilter-maybe-value): New procedure.
(serialize-configuration): Adapt to use base-transducer.

* gnu/services/telephony.scm (jami-account->alist): Use transducers to skip
fields that are unserializable or whose field maybe-value is unset.

* tests/services/configuration.scm: Remove test-expect-fail.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
1b29e5db — Bruno Victal 2 years ago
services: configuration: Simplify normalize-extra-args.

* gnu/services/configuration.scm
(define-configuration-helper, normalize-extra-args): Use #f instead of %unset-value.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
e863274e — Ludovic Courtès 2 years ago
services: hurd-vm: Leave root password uninitialized when offloading.

Starting with 953c65ffdd43c02c934518fb7a1c68542584b223, offloading to
the Hurd VM would be enabled by default.  However, ‘root’ had an empty
password so any user on the host could connect to the VM over VNC, log
in as root, and potentially populate the host’s store from there.  This
change fixes that.

* gnu/services/virtualization.scm (operating-system-with-locked-root-account):
New procedure.
(hurd-vm-disk-image)[transform]: Add
‘operating-system-with-locked-root-account’ when offloading.
a0818d02 — Ludovic Courtès 2 years ago
services: mcron: Hide ‘mkdir-p’ from (shepherd support).

This a avoids a Guile warning about the name collision with (guix build
utils).  The warning was introduced by commit
e0e85f2b2396c69d078caad9bd8e1a0fddf33a4a.

* gnu/services/mcron.scm (mcron-shepherd-services): Hide ‘mkdir-p’.
e0e85f2b — Ludovic Courtès 2 years ago
services: mcron: Do not #:select ‘%user-log-dir’.

* gnu/services/mcron.scm (mcron-shepherd-services): Do not #:select
‘%user-log-dir’ from (shepherd support) since it’s missing in the
Shepherd 0.8, which is still used on GNU/Hurd.
3b71b2dc — Ludovic Courtès 2 years ago
gnu: cuirass: Update to 797b26a.

* gnu/packages/ci.scm (cuirass): Update to 797b26a.
* gnu/services/cuirass.scm (cuirass-activation): Create /var/run/cuirass.
953c65ff — Ludovic Courtès 2 years ago
services: hurd-vm: Implement zero-configuration offloading.

This allows for zero-configuration offloading to a childhurd.

* gnu/services/virtualization.scm (operating-system-with-offloading-account):
New procedure.
(<hurd-vm-configuration>)[offloading?]: New field.
(hurd-vm-disk-image): Define ‘transform’ and use it.
(hurd-vm-activation): Generate SSH key for user ‘offloading’ and add
authorize it via /etc/childhurd/etc/ssh/authorized_keys.d.
(hurd-vm-configuration-offloading-ssh-key)
(hurd-vm-guix-extension): New procedures.
(hurd-vm-service-type): Add GUIX-SERVICE-TYPE extension.
* gnu/tests/virtualization.scm (run-childhurd-test)[import-module?]: New
procedure.
[os]: Add (gnu build install) and its closure to #:import-modules.
[test]: Add “copy-on-write store” and “offloading” tests.
* doc/guix.texi (Virtualization Services): Document it.
c3a19cc2 — Ludovic Courtès 2 years ago
services: hurd-vm: Disable password-based authentication for root.

With offloading to a childhurd is enabled, allowing password-less root
login in the childhurd to anyone amounts to providing write access to
the host’s store to anyone.  Thus, disable password-based root logins in
the childhurd.

* gnu/services/virtualization.scm (%hurd-vm-operating-system): Change
‘permit-root-login’ to 'prohibit-password.
* gnu/tests/virtualization.scm (%childhurd-os): Provide a custom ‘os’
field for ‘hurd-vm-configuration’.
* doc/guix.texi (Virtualization Services): Remove mention of
password-less root login.
bab6434f — Ludovic Courtès 2 years ago
services: hurd-vm: ‘image’ field has to be an <image> record.

* gnu/services/virtualization.scm (<hurd-vm-configuration>)[image]:
Document as being an <image> record.
(hurd-vm-disk-image): Remove call to ‘system-image’.
(hurd-vm-shepherd-service): Add call to ‘system-image’.
* gnu/tests/virtualization.scm (hurd-vm-disk-image-raw): Remove call to
‘system-image’.
* doc/guix.texi (Virtualization Services): Adjust accordingly.
416933cd — Ludovic Courtès 2 years ago
services: childhurd: Authorize the childhurd’s key on the host.

This partly automates setting up a childhurd for offloading purposes.

* gnu/services/virtualization.scm (authorize-guest-substitutes-on-host):
New procedure.
(hurd-vm-activation): Use it.
aa40b085 — Ludovic Courtès 2 years ago
services: guix: Support declarative offloading setup.

* gnu/services/base.scm (guix-machines-files-installation): New
procedure.
(<guix-configuration>)[build-machines]: New field.
(guix-activation): Call ‘ guix-machines-files-installation’.
(<guix-extension>)[build-machines]: New field.
(guix-extension-merge): Handle it.
(guix-service-type)[extend]: Likewise.
* doc/guix.texi (Daemon Offload Setup): Add note linking to
‘guix-configuration’.
(Base Services): Document ‘build-machines’ field of <guix-configuration>
and of <guix-extension>.
(Virtualization Services): Add ‘hurd-vm’ anchor.
21deb89e — Ludovic Courtès 2 years ago
services: guix: Use the right locale package on GNU/Hurd.

Fixes a bug introduced in 0dd293b4d9095137c9952e16ca951f887b7e7018
whereby guix-daemon on GNU/Hurd would have ‘GUIX_LOCPATH’ set to the
“wrong” locale data (2.35 instead of 2.37).

Consequently, it would fail to setlocale(3) and calls to
‘std::stoi’ (when reading the output of ‘guix authenticate’) would
throw, leading to this error message of guix-daemon:

  unexpected build daemon error: stoi

This would manifest when sending store items to a childhurd:

  $ guix copy --to=localhost:10022 sed
  guix copy: sending 1 store item (1 MiB) to 'localhost'...
  guix copy: error: unknown error while sending files over SSH

The “unknown error” is the ‘stoi’ exception.

This commit fixes that, but for the ‘guix-daemon’ service only.

* gnu/services/base.scm (guix-shepherd-service)[locales]: New variable.
Use it instead of ‘glibc-utf8-locales’.
81d46ef9 — Ludovic Courtès 2 years ago
services: hurd-vm: Use the default SSH port number.

* gnu/services/virtualization.scm (%hurd-vm-operating-system): Remove
‘port-number’ from ‘openssh-configuration’.
(hurd-vm-net-options): Change 2222 to 22 in port forwarding.
cdbd81ce — Liliana Marie Prikler 2 years ago
Merge branch 'master' into emacs-team
4163c617 — Marius Bakke 2 years ago
services: nftables: Add 'configuration' action.

* gnu/services/networking.scm (nftables-shepherd-service)[actions]: New field.
5e0ae268 — Ludovic Courtès 2 years ago
services: hurd-vm: Use ‘qemu-system-x86_64’.

Fixes <https://issues.guix.gnu.org/66053>.

* gnu/services/virtualization.scm (hurd-vm-shepherd-service)[vm-command]:
Use ‘qemu-system-x86_64’.
fc3a5352 — Ludovic Courtès 2 years ago
services: dhcp-client: Fix name of the provision accessor.

This is a followup to 04f71edb73205d0bb82404de28a70ae17b897429.

* gnu/services/networking.scm (<dhcp-client-configuration>)[shepherd-provision]:
Fix accessor name.
04f71edb — Alexey Abramov 2 years ago
services: dhcp-client-configuration: Allow provision override.

* gnu/services/networking.scm (<dhcp-client-configuration>)[shepherd-provision]:
New field.
(dhcp-client-shepherd-service): Honor it.
* doc/guix.texi (Networking Setup): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Next