1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-14 11:00:36 +02:00
Commit graph

3393 commits

Author SHA1 Message Date
Ludovic Courtès
b1dfc274ad
doc: Add missing paren in example.
* doc/guix.texi (Messaging Home Services): Add missing parent in
‘home-snuik-service-type’ example.

Change-Id: I97014da939f548000c45177f38387543c9200fc4
2025-07-09 11:53:23 +02:00
Maxim Cournoyer
0e14b1f971
doc: Update letsencrypt URL for retrieving ACME subscriber agreement.
* doc/guix.texi (Certificate Services): Update URL.

Change-Id: Ie32dcbc8198b70f1362b42c652542e3cc5654938
2025-07-08 16:54:06 +09:00
Pierre Langlois
57fc58ba48
services: certbot: Add dry-run? certificate option.
* gnu/services/certbot.scm (certificate-configuration): Add dry-run? field.
(certbot-command): Use it to pass --dry-run to certbot.
* doc/guix.texi (Certificate Services): Document dry-run? option.

Change-Id: I26b0dc06e2b7e5fb34305deee09e311d085f8a4b
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Modified-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-07-08 16:54:06 +09:00
Pierre Langlois
c603068f6f
services: certbot: Refer to authentication-hook in documentation.
* doc/guix.texi (Cerfiticate Services): Refer to non-abbreviated
authentication-hook instead of auth-hook.

Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-07-08 16:54:06 +09:00
Ludovic Courtès
6b42df3ad6
services: ci: Add Forgejo Runner service.
* gnu/services/ci.scm (<forgejo-runner-configuration>): New record type.
(create-forgejo-runner-account, forgejo-runner-activation)
(write-yaml, yaml-file, forgejo-runner-shepherd-service): New procedures.
(forgejo-runner-service-type): New variable.
* doc/guix.texi (Continuous Integration): Add “Forgejo Runner” heading.

Co-authored-by: David Thompson <davet@gnu.org>
Change-Id: Iba42d84da35812afa60e94773fbbadd68eca9813
2025-07-04 18:41:43 +02:00
Nicolas Graves
76a19b08b0
doc: Update CVE documentation.
* doc/guix.texi (Invoking guix lint): Document ‘cpe-vendor’ and
‘lint-hidden-cpe-vendors’.

Change-Id: I5f3054c9f6e2d1e85a1ccb293a2471439f5e5f44
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-30 19:36:42 +02:00
Christopher Baines
c099efbf59
gnu: bffe: Update to 0-15.2f9b1cb.
* gnu/packages/package-management.scm (bffe): Update to 0-15.2f9b1cb.
* doc/guix.texi (Guix Services): Remove build-priority option from example.

Change-Id: Ib6444dabef5bae4976d2ff9e3e4956873e49f0bc
2025-06-28 10:03:22 +02:00
jgart
2575929020
doc: Add copyright.
* doc/guix.texi: Add copyright.

Change-Id: I4bc634a8ae5341e664988cd062155d67bd265e90
2025-06-25 15:57:12 -04:00
jgart
f4841808e2
doc: Mention asdf-build-system/clasp.
* doc/guix.texi: Mention asdf-build-system/clasp.

Change-Id: I571c1ac455473ae999a5d35470813b3c4e5fd06e
Signed-off-by: jgart <jgart@dismail.de>
2025-06-25 15:23:16 -04:00
Reepca Russelstein
fb42611b8f
daemon: Use slirp4netns to provide networking to fixed-output derivations.
Previously, the builder of a fixed-output derivation could communicate with an
external process via an abstract Unix-domain socket.  In particular, it could
send an open file descriptor to the store, granting write access to some of
its output files in the store provided the derivation build fails—the fix for
CVE-2024-27297 did not address this specific case.  It could also send an open
file descriptor to a setuid program, which could then be executed using
execveat to gain the privileges of the build user.

With this change, fixed-output derivations other than “builtin:download”
and “builtin:git-download” always run in a separate network namespace
and have network access provided by a TAP device backed by slirp4netns,
thereby closing the abstract Unix-domain socket channel.

* nix/libstore/globals.hh (Settings)[useHostLoopback, slirp4netns]: new
fields.
* config-daemon.ac (SLIRP4NETNS): new C preprocessor definition.
* nix/libstore/globals.cc (Settings::Settings): initialize them to defaults.
* nix/nix-daemon/guix-daemon.cc (options): add --isolate-host-loopback option.
* doc/guix.texi: document it.
* nix/libstore/build.cc (DerivationGoal)[slirp]: New field.
(setupTap, setupTapAction, waitForSlirpReadyAction, enableRouteLocalnetAction,
 prepareSlirpChrootAction, spawnSlirp4netns, haveGlobalIPv6Address,
 remapIdsTo0Action): New functions.
(initializeUserNamespace): allow the guest UID and GID to be specified.
(DerivationGoal::killChild): When ‘slirp’ is not -1, call ‘kill’.
(DerivationGoal::startBuilder): Unconditionally add CLONE_NEWNET to FLAGS.
When ‘fixedOutput’ is true, spawn ‘slirp4netns’.
When ‘fixedOutput’ and ‘useChroot’ are true, add setupTapAction,
waitForSlirpReadyAction, and enableRouteLocalnetAction to builder setup
phases.
Create a /etc/resolv.conf for fixed-output derivations that directs them to
slirp4netns's dns address.
When settings.useHostLoopback is true, supply fixed-output derivations with a
/etc/hosts that resolves "localhost" to slirp4netns's address for accessing
the host loopback.
* nix/libutil/util.cc (keepOnExec, decodeOctalEscaped, sendFD, receiveFD,
  findProgram): New functions.
* nix/libutil/util.hh (keepOnExec, decodeOctalEscaped, sendFD, receiveFD,
  findProgram): New declarations.
* gnu/packages/package-management.scm (guix): add slirp4netns input for linux
  targets.
* tests/derivations.scm (builder-network-isolated?): new variable.
  ("fixed-output derivation, network access, localhost", "fixed-output
  derivation, network access, external host"):
  skip test case if fixed output derivations are isolated from the network.

Change-Id: Ia3fea2ab7add56df66800071cf15cdafe7bfab96
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:57 -04:00
Jonas Meeuws
a597b95593
doc: Replace ftp.gnu.org with ftpmirror.gnu.org
* doc/guix.texi: Change BASE-URL.

Closes: #408
Change-Id: Id71b413d55019d900ead71e690c2c8fe407f5a3e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-16 23:11:10 +02:00
Ludovic Courtès
5a0271c43f
services: iwd: Use the official name.
* gnu/services/networking.scm (iwd-shepherd-service): Fix name and
mention “iwd” in ‘description’.
* doc/guix.texi (Networking Setup): Correct iwd’s name and add link.

Change-Id: I7605488f2018b8ac60664c6617a82f05ddadf6ec
2025-06-06 18:30:27 +02:00
Ludovic Courtès
33ec2f58ff
services: iwd: Provide default value in <iwd-settings>.
Fixes a failure of ‘tests/guix-system.sh’, when running ‘guix system
search .’:

    2296:10  3 (iwd-environment _)
     2165:0  2 (%iwd-network-settings-name-resolving-service-procedure #)
  In ice-9/boot-9.scm:
    1685:16  1 (raise-exception _ #:continuable? _)
    1685:16  0 (raise-exception _ #:continuable? _)

  ice-9/boot-9.scm:1685:16: In procedure raise-exception:
  In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): %unset-marker%

* gnu/services/networking.scm (iwd-settings)[network]: Provide default
value.

Change-Id: I2ea28853f698583ceeaa0b56cde8447fe3546dc3
2025-06-06 18:22:51 +02:00
Sergey Trofimov
c4e1081f82
services: networking: Add iwd-service-type.
* gnu/services/networking.scm (iwd-service-type): New service type.
(iwd-configuration), (iwd-settings), (iwd-scan-settings),
(iwd-general-settings), (iwd-network-settings): New configuration types.
* doc/guix.texi (Networking setup): Document it.

Change-Id: I852115b9c6768b3ec4eedb34a7f9e66438bd1429
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:43:36 +02:00
Sergey Trofimov
e4995c9978
services: network-manager: Require wireless-daemon.
* gnu/services/networking.scm
(<network-manager-configuration>)[shepherd-requirement]:
Replace wpa-supplicant with wireless-daemon.
* doc/guix.texi (Networking Setup): Adjust.

Change-Id: Id1a51429ccb6ea24839fc2aacd051a3ffe91c33c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:14 +02:00
Sergey Trofimov
faa8cdfc09
services: wpa-supplicant: Add 'wireless-daemon' provision.
* gnu/services/networking.scm (wpa-supplicant-configuration):
[requirement]: Deprecate, [shepherd-requirement]: New field,
[shepherd-provision]: Extract to a field. Add 'wireless-daemon to it.
* doc/guix.texi (Networking Setup): Document it.

Change-Id: Icc6fdd695e6e96ef168a085524989da639f77cd3
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:14 +02:00
Sergey Trofimov
2ec1469104
services: networking: Add shepherd-requirement for dhcpcd.
* gnu/services/networking.scm (dhcpcd-configuration): Add
shepherd-requirement field.
(dhcpcd-shepherd-service): Use it.
* doc/guix.texi (Networking Setup): Regenerate dhcpcd-configuration
documentation.
(File Systems): Fix typo.

Change-Id: Id347e2bed2569237685a47be82dbf686640db25b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-05 22:42:13 +02:00
Maxim Cournoyer
f458883cf5
doc: Substitute 'outputted' for 'output'.
* doc/guix.texi (mpv Media Player): Use the more common usage [0].

[0]  https://english.stackexchange.com/a/35433

Change-Id: I5c10d281441c2995849df880dbaf62a790d2ff78
2025-05-27 19:22:39 +09:00
Tomas Volf
0543ccf62c
home-mpv-configuration: Support file-like for file fields.
* gnu/home/services/mpv.scm (serialize-mpv/file, mpv/file?): New procedures.
(ao-null-latency, audio-file-paths, audio-files, bluray-device, cdda-device)
(chapters-file, cookies-file, cover-art-files, demuxer-cache-dir, dump-stats)
(dvbin-file, dvd-device, external-files, glsl-shaders, gpu-shader-cache-dir)
(icc-cache-dir, icc-profile, image-lut, include, input-conf, input-ipc-server)
(log-file, lut, ordered-chapters-files, osd-fonts-dir, screenshot-directory)
(scripts, stream-dump, sub-ass-styles, sub-file-paths, sub-files)
(sub-fonts-dir, target-lut, tls-ca-file, tls-cert-file, tls-key-file):
(vo-image-outdir, watch-history-path, watch-later-directory): Change type.
* doc/guix.texi (mpv Media Player): Document it.

Reported-by: Sergey Trofimov <sarg@sarg.org.ru>
Change-Id: I7e55b306104c235d165ab138397b767f1af5c124
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-27 19:22:39 +09:00
Tomas Volf
0e23ff2995
home-mpv-configuration: Update for mpv 0.40.0.
* gnu/home/services/mpv.scm (audio-backward-batch, clipboard-backends)
(clipboard-monitor?, demuxer-mkv-crop-compat?, hwdec-software-fallback)
(input-ime?, load-commands?, load-console?, load-positioning?)
(osd-bar-marker-min-size, osd-bar-marker-scale, osd-bar-marker-style)
(osd-selected-color, osd-selected-outline-color, playlist-exts)
(save-watch-history?, sub-ass-prune-delay, sub-ass-scale-with-window?)
(sub-hinting, sub-line-spacing, sub-scale-signs?, sub-shaper, video-recenter?)
(watch-history-path, wayland-internal-vsync): New options.
(cache-pause-wait, video-aspect-override): Change range.
(dvbin-timeout, media-controls, target-colorspace-hint): Change type.
(video-aspect-method): Add enumeration member.
(drm-connector, drm-device, drm-draw-plane, drm-draw-surface-size)
(drm-drmprime-video-plane, drm-format, drm-mode, drm-vrr-enabled)
(load-osd-console?, sub-ass-hinting, sub-ass-line-spacing)
(sub-ass-scale-with-window?, sub-ass-shaper)
(vd-lavc-software-fallback): Removed options.
* doc/guix.texi: Update the list of fields.

Change-Id: I7e55b306104c235d165ab138397b767f1af5c124
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-27 19:22:39 +09:00
Maxim Cournoyer
cfa2de2a77
services: Modernize and test nftables service.
* doc/guix.texi (Networking Services) <nftables>: Update doc.
* gnu/services/networking.scm (list-of-debug-levels?):
(debug-level?, maybe-list-of-debug-levels?):
(nftables-configuration): Rewrite using `define-configuration'.
[debug-levels]: New field.
(nftables-shepherd-service): Honor it.
* gnu/tests/networking.scm (%inetd-echo-port): Extract to top level.
(run-iptables-test): Adjust accordingly.
(make-nftables-os): New procedure.
(%default-nftables-ruleset-for-tests): New variable.
(%nftables-os): Likewise.
(%test-nftables): New test.

Change-Id: I2889603342ff6d2be6261c3de6e4fddd9a9bbe2d
2025-05-26 13:43:28 +09:00
Maxim Cournoyer
900d1fdbff
services: Add vte-integration-service-type.
* gnu/services.scm (vte-integration-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.

Change-Id: I7e4bc1b913b50a5a061894f9ddef27f1877b62a2
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
c743d646ee
system: Factorize bashrc default configuration.
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.

Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.

* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here.  Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value.  Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.

Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
45b883a9d3
system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type.
* gnu/system.scm (operating-system-etc-service): Remove block sourcing
bash_completion.sh.
(%base-packages-interactive): Delete bash-completion.
* gnu/services.scm (%default-etc-bashrc-d-files): New variable, which includes
the bash_completion.sh file.
(etc-bashrc-d-service-type): Use it.
* doc/guix.texi (Service Reference): Update documentation.

Change-Id: I2223a5f96f5d761148badc6be29e1c5c80465a1d
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
4c017ccfe5
services: Add etc-bashrc-d-service-type.
* gnu/services.scm (files->bashrc-d-directory) New procedure.
(etc-bashrc-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (test-basic-os): Test it.

Change-Id: Ibbb0f684de7aee296adedbce5b1192786d661af2
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
279adf431b
services: Add etc-profile-d-service-type.
* gnu/services.scm (make-files->etc-directory)
(files->profile-d-entries): New procedures.
(etc-profile-d-service-type): New service type.
* doc/guix.texi (Service Reference): Document it.
* gnu/tests/base.scm (run-basic-test): Test it.

Change-Id: I45dde43a1b9603c3384b933ebd1d6e45dba146b9
2025-05-26 13:43:03 +09:00
Ludovic Courtès
f5219f0b38
doc: Update URL of installation script.
* doc/guix.texi (Binary Installation): Update URL of installation
script.

Change-Id: I72ec47b9510d5ec0cf27a146b2c0e6b59d42e963
2025-05-25 13:03:29 +02:00
Ludovic Courtès
807027dc0a
doc: Replace Savannah URLs with Codeberg URLs.
* doc/contributing.texi (Requirements): Update Guix web site URL.
(Sending a Patch Series): Replace Savannah URLs with Codeberg URLs.
(Debbugs User Interfaces): Likewise.
(Commit Access): Likewise.
(Updating the Guix Package): Likewise.
(Coding): Likewise.
(System Administration): Likewise.
(Day-to-Day System Administration): Likewise.
* doc/guix.texi (Web Services): Likewise.

Change-Id: I5c6532f3e02e8870f869dd4ab844eed3cb0cb242
2025-05-25 13:03:29 +02:00
Ludovic Courtès
3b6e499d5e
maint: Change main repository URL to git.guix.gnu.org.
Throughout, replace “https://git.savannah.gnu.org/git/guix.git” by
“https://git.guix.gnu.org/guix.git”.

Change-Id: Ieb82464f92a806b85c79e629f952e68c39323740
2025-05-23 11:19:07 +02:00
Sergey Trofimov
b989e503ac
gexp: Add symlink-to procedure.
* guix/gexp.scm (symlink-to): New procedure.
* doc/guix.texi (G-Expressions): Document it.

Change-Id: I7c1ba3a29a4e5350cb4f196185b7171c4750b6b8
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-21 08:05:27 +09:00
Sergey Trofimov
9b7213fc11
gexp: Allow file-unions with dangling symlinks.
* guix/gexp.scm (file-union): Add #:dangling-symlinks? parameter.

Change-Id: I09d44ec785fd7141b02dee2d8dc23ccc499aa933
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-21 08:05:27 +09:00
Maxim Cournoyer
271a8fc249
refresh: Allow specifying a partial version via the version specification.
* guix/scripts/refresh.scm (update-specification->update-spec): Flag the
update-spec as partial when it is prefixed with '~'.
* tests/guix-refresh.sh: Test it.  Remove extraneous 'guix refresh'
invocation.
* doc/guix.texi (Invoking guix refresh): Document it.

Change-Id: Iab4482d9367105f6ffcd2d6a49148736c93d53e4
Reviewed-by: Florian Pelz <pelzflorian@pelzflorian.de>
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2025-05-19 10:07:24 +09:00
Sughosha
b1d2483ebe
home: services: Add readymedia.
* gnu/home/services/upnp.scm: New file.
* gnu/local.mk: Register it.
* gnu/services/upnp.scm: Export readymedia-activation and
readymedia-shepherd-service.
(<readymedia-configuration>)[home-service?]: New field.
[cache-directory]: Adjust value depending on 'for-home?'.
[log-directory]: Ditto.
(readymedia-shepherd-service): Adjust 'requirement' and 'start' according to
'home-service?'.
(readymedia-activation): Adjust creating 'media-directories' with permissions
according to 'home-service?'.
* gnu/tests/upnp.scm (%readymedia-configuration-test): Configure port with
%readymedia-default-port.
* doc/guix.texi (Miscellaneous Home Services): Document Readymedia Service.
(Miscellaneous Services): Add cross-reference.

Change-Id: I5c48595d84a815d98e03c7f68a716f048903720c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-05-18 22:55:54 +02:00
Giacomo Leidi
1220d1a84e
home: Add home-restic-backup service.
* gnu/services/backup.scm: Drop mcron obsolete export.
(restic-backup-job-program): Generalize to restic-program.
(lower-restic-backup-job): New procedure implementing a standard way to
lower restic-backup-job records into lists.
(restic-program): Implement general way to run restic commands, for
example to initialize repositories.
(restic-backup-configuration): Reimplement
with (guix records).
(restic-backup-job-{logfile,command,requirement,modules}): Add new
procedures and add support for Guix Home environments.
(restic-backup-job->shepherd-service): Add support for Guix Home
environments.
(restic-backup-service-activation): Drop procedure as now the Shepherd
takes care of creating timers log file directories.
(restic-backup-service-type): Drop profile and activation services extensions.
* gnu/home/services/backup.scm: New file.
* gnu/local.mk: Add this.
* doc/guix.texi: Document this.

Change-Id: Ied1c0a5756b715fba176a0e42ea154246089e6be
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-05-18 22:55:53 +02:00
Alexey Abramov
efcf1a2334
services: dnsmasq: Add stats and reload shepherd actions.
* gnu/services/dns.scm (dnsmasq-service-reload-action): New function.
Implements SIGHUP handling for reloading configurations.
(dnsmasq-service-stats-action): New function. Implements SIGUSR1
handling for dumping statistics.
(dnsmasq-shepherd-service): Use new actions.
* doc/guix.texi: Document new actions with examples.
* gnu/tests/networking.scm (%test-dnsmasq): Add tests to verify the
functionality of new actions.

Change-Id: I31f0eb4b26a582e95f7bfdb240110c139f0e16cc
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Alexey Abramov
50126b39ac
services: dnsmasq: Add pid-file, conf-file and conf-dir configuration fields.
* gnu/services/dns.scm (<dnsmasq-configuration>) [pid-file]: New field
to specify alternate path for dnsmasq PID.
[conf-file]: New field to specify one or more configuration files.
[conf-dir]: New field to read configuration files from a directory.
[extra-options]: Move to the end of the definition as a last resort option.
(dnsmasq-shepherd-service): Use new fields instead of hardcoded values.
* gnu/services/dns.scm: Export all record accessors.
* doc/guix.texi: Document new configuration options.

Change-Id: Iaec361e7d8bfd60af04f023f57d422b55b0c1eea
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Alexey Abramov
6d5f630fa5
services: dnsmasq: Add shepherd-provision and shepherd-requirement fields.
* gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: Mark
filed as deprecated with a warning.  Set default to #f.
[shepherd-provision]: Add new field for consistency with other services.
[shepherd-requirement]: Add new field.
(dnsmasq-shepherd-service): Use them.
* doc/guix.texi: Document these changes.
* doc/guix-cookbook.texi (Custom NAT-based network for libvirt): Update
example to use 'shepherd-provision' instead of 'provision'.

Change-Id: Icad4d9c4be5bf58368e8c416f1fdde1f9065557d
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-16 17:01:11 +09:00
Tomas Volf
364694773e
gnu: home: services: Add home-mpv-service-type.
This commit adds a new service type to generate configuration file for the mpv
media player.

Originally I attempted to use Guix Records (via define-configuration) for
this, but ran into the bug #74748, so I had to switch to procedures instead.
The usage is (hopefully) sufficiently described in the documentation.  When
the bug is resolved, I will update it to use define-configuration instead.

The full list of supported options is documented, however I decided to *not*
document types and purpose for each individual fields.  While I had mostly
working prototype to extract the documentation from mpv, once I realized it
would be few 10k of lines added, I decided it is not worth it.  It would bloat
the .texi file (by more than 50%), be hard to maintain and, in my opinion,
would not provide enough value to justify that.  The current version seems
like sane middle ground.

* gnu/home/services/mpv.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
* doc/guix.texi (mpv Media Player): Document it.

Change-Id: I2deb44799a28047cb5d67da97dc6007a9df873af
2025-05-13 10:55:49 +09:00
Evgeny Pisemsky
c2d9d5580e
doc: Add missing heading and fix accidental duplication.
* doc/guix.texi: Add missing heading for Snuik Service, fix accidental
duplication of sections for Mosquitto Service.

Change-Id: Id3e3a80da70e6eb47ee9c5afa69d3c48efea4754
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-12 15:26:50 +09:00
Evgeny Pisemsky
44d178265c
services: Add mosquitto-service-type.
* gnu/services/messaging.scm (<mosquitto-configuration>): New record type.
(mosquitto-accounts): New procedure.
(mosquitto-shepherd-service): New procedure.
(mosquitto-service-type): New variable.
* doc/guix.texi (Messaging Services): Document it.

Change-Id: I3500c5b6b69084c1f4a6da66ea45bfd42c871f3f
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-05-09 19:47:24 +02:00
Ludovic Courtès
ce363c1dc7
environment: Add ‘--writable-root’ and default to read-only root.
This is an incompatible change where the root file system in
‘guix shell -C’ is now read-only by default.

* guix/scripts/environment.scm (show-environment-options-help)
(%options): Add ‘--writable-root’.
* guix/scripts/environment.scm (setup-fhs): Invoke /sbin/ldconfig; moved
from…
(launch-environment): … here.
(launch-environment/container): Add #:writable-root? and pass it to
‘call-with-container’.  Move root file system setup to #:populate-file-system.
(guix-environment*): Honor ‘--writable-root’.
* tests/guix-environment-container.sh: Test it.
* doc/guix.texi (Invoking guix shell): Document ‘--writable-root’.
(Debugging Build Failures): Mention it before “rm /bin/sh”.

Change-Id: I2e8517d6f01eb8093160bffc0f9f56071ad6fee6
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-05 14:33:59 +02:00
Romain GARBAGE
79bc4ebb33
transformations: Git source transformations honour RECURSIVE?.
* guix/transformations.scm (package-git-url+recursive?): New variable.
(package-git-url): Remove variable.
(evaluate-git-replacement-specs): Use package-git-url+recursive?.
(transform-package-source-branch, transform-package-source-commit, transform-package-source-git-url): Update
according to changes above.
* doc/guix.texi (Package Transformation Options): Update documentation.
* tests/transformations.scm: Update tests. Add tests for RECURSIVE?
inheritance with WITH-COMMIT and WITH-SOURCE.

Change-Id: Id6a5e6957a9955c8173b06b3e14f2986c6dfc4bc
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-05-05 12:15:47 +02:00
Hilton Chain
415e3d98d6
scripts: home: Support extracting home-environment from Guix System declaration.
* guix/scripts/home.scm (process-action): Handle operating-system declaration
and extract home environment for current user.
* doc/guix.texi (Guix Services)[Guix Home Service]: Document it.

Change-Id: I995f79c2549e6edc76322542d0422159e0b79996
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>
2025-05-03 15:53:46 +08:00
Maxim Cournoyer
5d5c0dfcda
doc: Regenerate Texinfo menus.
Done with 'M-x texinfo-all-menus-update' in Emacs.

* doc/guix.texi (Top): Regenerate menus.

Change-Id: I4ae480d5e77296cb8b187b5629805b60f4a3cf02
2025-05-02 22:06:26 +09:00
Sergio Pastor Pérez
492bbb9700
services: kwallet: New service.
Change-Id: I1330ce5e1648a8ddf6ddd507255a73335d6baa51
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-02 22:06:26 +09:00
Giacomo Leidi
9d216d2ae9
services: postgresql-role: Add support for password files.
This commit adds a password-file to the postgresql-role field.  It
allows users to provision Postgres roles with a set password.

* gnu/services/databases.scm (postgresql-role): Add password-file field.
(postgresql-role-configuration): Add requirement field.
(postgresql-create-roles): Add support for setting passwords from a
file without leaking passwords to the command line.
(postgresql-role-shepherd-service): Add support for customizable
requirements.
(postgresql-role-service-type): Pass on postgresql-role-configuration
fields values by default, this way user configured fields are not lost.
* gnu/tests/databases.scm: Test it.
* doc/guix.texi: Document the new field and fix the extension point example.

Change-Id: I3aabaa10b0c5e826c5aa874e5649e25a3508a585
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-05-02 15:32:25 +09:00
Maxim Cournoyer
74325f91c9
services: Normalize and improve libvirt-configuration documentation.
* gnu/services/virtualization.scm (libvirt-configuration): Fix typos and
punctuation, and decorate with more Texinfo adornments.  Remove extraneous
text.  Convert enumerations to sentences re-generating the Texinfo
documentation with configuration->documentation doesn't require fixing these
by hand after (the text is re-flowed, breaking enumerations).  Mention the use
of 'log-filters' is preferable to 'log-level', as commented in the defaut
libvirt.conf template.
* doc/guix.texi (Virtualization Services): Re-generate.

Change-Id: Icc2abe21a787b4bb6ac3b35a95f6aaaf3bbda9aa
2025-05-02 09:53:54 +09:00
Maxim Cournoyer
bb8cc412c8
services/udev: Allow configuring udev to run in debug mode.
This re-introduces commit dd64f441d3, which had
been reverted due to previously causing a system hang when debug? was enabled,
a problem that appears to have been resolved within Shepherd.

* gnu/services/base.scm (<udev-configuration>): <debug?>: New field.
* gnu/services/base.scm (udev-shepherd-service): Use it to add '--debug' to
the command line, if applicable.
* doc/guix.texi (Base Services): Document it.

Change-Id: I88243fb4f321ff0876dd227e3c2b22082d37cfcf
2025-04-30 22:44:34 +09:00
Maxim Cournoyer
f10d00e4e2
services: elogind: Split sleep.conf and port to define-configuration.
* gnu/services/desktop.scm (pascal-case): New procedure.
(<elogind-configuration>): Rewrite in terms of define-configuration.
(elogind-configuration-file): Delete.
(maybe-list-of-suspend-states?, maybe-list-of-suspend-modes?)
maybe-list-of-user-names?, maybe-boolean?maybe-package?)
(maybe-action?, maybe-percent?, maybe-list-of-strings?)
(maybe-list-of-hibernation-modes?, maybe-non-negative-integer?)
(non-negative-integer?, percent?, char-set:user-name, user-name?)
(list-of-user-names?, %elogind-actions, action?, %linux-suspend-states)
(string->symbol/maybe, suspend-state?, list-of-suspend-states?)
(%linux-suspend-modes, suspend-mode?, list-of-suspend-modes?)
(%linux-hibernation-modes, hibernation-mode?, list-of-hibernation-modes?)
(elogind-deprecated-empty-serializer, list-of-file-likes?)
(elogind-serialize-boolean, elogind-base-serializer, elogind-serialize-action)
(elogind-serialize-non-negative-integer, elogind-serialize-percent)
(elogind-list-serializer, elogind-serialize-list-of-strings)
(elogind-serialize-list-of-user-names, elogind-serialize-list-of-suspend-states)
(elogind-serialize-list-of-suspend-modes)
(elogind-serialize-list-of-hibernation-modes)
(%elogind-configuration-sleep-fields, logind.conf, sleep.conf): New procedures.
(elogind-etc-directory): Create the main configuration files there too.
(elogind-dbus-service): Adjust for package accessor name change.
(pam-extension-procedure, elogind-shepherd-service)
(elogind-service-type):  Likewise.
(shepherd-configuration-action*): New procedure.
* doc/guix.texi (Desktop Services): Fully document configuration options.

Fixes: https://issues.guix.gnu.org/77806
Change-Id: I8767891871d83e58d64995ec986a7d01689fa6d8
Reported-by: Ludovic Courtès <ludo@gnu.org>
2025-04-26 22:56:59 +09:00
Tomas Volf
5bbb053bea
services: postgresql-service-type: Allow allowing to log into the user.
It is often useful to be able to use the `postgres' user for management tasks,
so this commit allows setting that.  The default behavior is not changed.

I have also added missing exports and sorted them by alphabet.

* gnu/services/databases.scm (%default-home-directory): New variable.
(<postgresql-configuration>): Add home-directory, allow-login? fields.
(create-postgresql-account): Use them.
* doc/guix.texi (Database Services): Document it.

Change-Id: I2212e5082ff4e87c49a5a8a4711bf929dd08626a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
2025-04-23 12:25:46 +02:00