summaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
AgeCommit message (Collapse)Author
2022-05-18services: Add more description fields.Ludovic Courtès
* 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-02services: Make sure Shepherd destructors match constructors.Ludovic Courtès
This is a followup to b06ecc57515d4e3c8b2228e8142654e9a26ba6e1, 211fe3f66e6dfdaa64974931c458ab1d92afc182, and fd57ce267c4083fe98242caa31075d2bd62903bf. * 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-01gexp: Add 'references-file'.Ludovic Courtès
* gnu/services/base.scm (references-file): Remove. * guix/gexp.scm (references-file): New procedure. * tests/gexp.scm ("references-file"): New test.
2022-04-29services: guix-publish: Use socket activation when possible.Ludovic Courtès
* gnu/services/base.scm (guix-publish-shepherd-service): Use 'make-systemd-constructor' when it's available and ADVERTISE? is false.
2022-04-04services: Add 'log-cleanup' service to '%base-services' for build logs.Ludovic Courtès
* gnu/services/base.scm (%base-services): Add 'log-cleanup-service-type' instance. * doc/guix.texi (Log Rotation): Add example and mention '%base-services'.
2022-03-10services: guix: Add 'generate-substitute-key?' field.Ludovic Courtès
* gnu/services/base.scm (<guix-configuration>)[generate-substitute-key?]: New field. (guix-activation): Honor it. * doc/guix.texi (Base Services): Document it.
2022-02-25agetty-shepherd-service: Rename console agetty to "term-console" for clarity.Danny Milosavljevic
* gnu/services/base.scm (agetty-shepherd-service)[provision]: Rename console agetty to "term-console".
2022-02-25services: %base-services: Adapt agetty-service-type to depend on syslogdDanny Milosavljevic
Fixes <https://issues.guix.gnu.org/30464>. * gnu/services/base.scm (%base-services): Reorder syslog-service for clarity. [shepherd-requirement]: New field.
2022-02-25services: agetty: Add shepherd-requirement.Danny Milosavljevic
* gnu/services/base.scm (<agetty-configuration>): Add shepherd-requirement. * doc/guix.texi (agetty-configuration): Document it.
2022-02-20services: udev: Use a fixed location for the rules directory and config.Maxim Cournoyer
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-01-20services: guix-publish: Add negative-ttl parameter.Guillaume Le Vaillant
* 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-18daemon: Always default to gzip for log compression.Ludovic Courtès
* 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-16services: guix: Add tar and gzip to PATH.Timothy Sample
* gnu/services/base.scm (guix-shepherd-service): Add the PATH environment-variable and populate it with tar and gzip.
2022-01-08services: networking: Add netmask to loopback address.Ludovic Courtès
Previously, we would get a fishy 127.0.0.1/0 interface: $ ip a show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet 127.0.0.1/0 scope global lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever With this change, we get nothing but the "/8" version: $ ip a show dev lo 1: lo: <LOOPBACK,MULTICAST,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope global lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever Reported by Yann Dupont <Yann.Dupont@univ-nantes.fr>. * gnu/services/base.scm (assert-valid-address): Remove special cases for 127.0.0.1 and ::1. (%loopback-static-networking): Add "/8".
2021-12-21services: static-networking: Enable multicast by default.Mathieu Othacehe
Fixes: <https://issues.guix.gnu.org/52520>. * gnu/services/base.scm (network-set-up/linux): Enable it.
2021-12-20services: static-networking: Sanitize <network-address> values.Ludovic Courtès
This makes sure users do not mistakenly configuring a network with "/0" as its netmask. * gnu/services/base.scm (assert-valid-address): New procedure. (<network-address>)[value]: Add it as 'sanitize'.
2021-12-12services: Define '%loopback-static-networking'.Ludovic Courtès
* gnu/services/base.scm (%loopback-static-networking): New variable. (%base-services): Use it. * gnu/system/hurd.scm (%base-services/hurd): Use it. * gnu/system/install.scm (%installation-services): Use it. * doc/guix.texi (Networking Setup): Document it.
2021-12-12services: Define '%qemu-static-networking'.Ludovic Courtès
* gnu/services/base.scm (%qemu-static-networking): New variable. * gnu/system/hurd.scm (%base-services/hurd): Use it. * doc/guix.texi (Networking Setup): Document it.
2021-12-12services: static-networking: Change interface to mimic netlink.Ludovic Courtès
* gnu/services/base.scm (<static-networking>)[interface, ip, netmask] [gateway]: Remove. [addresses, links, routes]: New fields. [requirement]: Default to '(udev). (<network-address>, <network-link>, <network-route>): New record types. (ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove. (ipv6-address?, cidr->netmask, ip+netmask->cidr) (network-set-up/hurd, network-tear-down/hurd) (network-set-up/linux, network-tear-down/linux) (static-networking->hurd-pfinet-options): New procedures. (static-networking-shepherd-service): New procedure. (static-networking-shepherd-services): Rewrite in terms of the above. (static-networking-service): Deprecate. Adjust to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface.
2021-12-12services: static-networking: Use Guile-Netlink on GNU/Linux.Ludovic Courtès
* gnu/services/base.scm (static-networking-shepherd-service): Define 'set-up-via-ioctl', 'tear-down-via-ioctl', 'set-up-via-netlink', 'tear-down-via-netlink', and 'helpers' and use them in 'start' and 'stop'. Add (ip *) modules to 'modules'.
2021-11-30services: Accept <inferior-package>s in lieu of <package>s.Tobias Geerinckx-Rice
* gnu/services/authentication.scm (fprintd-configuration) (nslcd-configuration): Substitute file-like objects for package ones. * gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration): Likewise. * gnu/services/cups.scm (package-list?, cups-configuration): Likewise. * gnu/services/dns.scm (verify-knot-configuration) (ddclient-configuration): Likewise. * gnu/services/docker.scm (docker-configuration): Likewise. * gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise. * gnu/services/getmail.scm (getmail-configuration): Likewise. * gnu/services/mail.scm (dovecot-configuration) (opaque-dovecot-configuration): Likewise. * gnu/services/messaging.scm (prosody-configuration) (opaque-prosody-configuration): Likewise. * gnu/services/monitoring.scm (zabbix-server-configuration) (zabbix-agent-configuration): Likewise. * gnu/services/networking.scm (opendht-configuration): Likewise. * gnu/services/pm.scm (tlp-configuration): Likewise. * gnu/services/telephony.scm (jami-configuration): Likewise. * gnu/services/virtualization.scm (libvirt-configuration) (qemu-guest-agent-configuration): Likewise. * gnu/services/vpn.scm (openvpn-client-configuration): Likewise.
2021-11-23gnu: system: Make old-style swap use default flags.Josselin Poiret
* gnu/services/base.scm (swap-service-type): Use default flags (0) if SWAP is not a new-style <swap-space> record. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-11-23system: Add swap flags.Josselin Poiret
* gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add them. * guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK, SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them. * gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it. * gnu/services/base.scm (swap-service-type): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23system: Rework swap space support, add dependencies.Josselin Poiret
* gnu/system/file-systems.scm (swap-space): Add it. * gnu/system.scm (operating-system)[swap-devices]: Update comment. * gnu/services/base.scm (swap-space->shepherd-service-name, swap-deprecated->shepherd-service-name, swap->shepherd-service-name): Add them. * gnu/services/base.scm (swap-service-type, swap-service): Use the new records. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-08-29services: base: Honor file-system-create-mount-point? at all times.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/40158>. * gnu/services/base.scm (file-system-shepherd-service): Update doc. Return a shepherd service for the mount point when either MOUNT? or CREATE? is true. [start]: Only mount when MOUNT? is true. (file-system-shepherd-services): Also consider file systems with create-mount-point? set to #t.
2021-08-07services: pam-limits: fix limits.conf locationmuradm
* gnu/services/base.scm: fix limits.conf location This fixes #49771 Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2021-08-04services: guix: Use "match-record" in activation.Brice Waegeneire
It's more explicit to specify used fields instead of depending on their position. * gnu/services/base.scm (guix-activation): Replace "match" with "match-record".
2021-07-13services: gpm: Use "make-forkexec-contstructor".Brice Waegeneire
* gnu/services/base.scm (gpm-shepherd-service)[start]: Replace custom logic with "make-forkexec-constructor".
2021-06-29services: kmscon: Add keyboard-layout fields.luhui
* gnu/services/base.scm (<kmscon-configuration>): Add keyboard-layout fields. * doc/guix.texi (Base Services): Document them. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-06-19services: guix: Authorize 'bordeaux.guix.gnu.org.pub' by default.Jack Hill
This follows on from the changes in 4985a4272497bf9ba87a2190353d915da9b55906. * gnu/services/base.scm (%default-authorized-guix-keys): Add bordeaux.guix.gnu.org.pub. Signed-off-by: Christopher Baines <mail@cbaines.net>
2021-06-14services: Remove deprecated service procedures.Ludovic Courtès
These service procedures were deprecated in January 2019, for instance in commit 65a67bf711b14bc7200f6730c0f173375ca12974. * gnu/services/avahi.scm (avahi-service): Remove. * gnu/services/base.scm (console-keymap, guix-service) (guix-publish-service, gpm-service, urandom-seed-service): Remove. * gnu/services/desktop.scm (upower-service, colord-service): Remove. * gnu/services/mcron.scm (mcron-service): Remove. * gnu/services/messaging.scm (bitlbee-service): Remove. * gnu/services/networking.scm (dhcp-client-service, ntp-service) (tor-service): Remove. * gnu/services/xorg.scm (slim-service, gdm-service): Remove.
2021-04-03services: guix-publish: Add zstd compression by default.Ludovic Courtès
That way, the default config with (advertises? #t) and without a cache will offer zstd-compressed substitutes, which should lead to much higher throughput than gzip. * gnu/services/base.scm (default-compression): When 'guix-publish-configuration-cache' returns true, use higher level compression ratios. Add "zstd". * doc/guix.texi (Base Services): Mention zstd.
2021-04-01services: kmscon: Add font-engine and font-size fields.qblade
* gnu/services/base.scm (<kmscon-configuration>): Add font-engine and font-size fields. (kmscon-service-type): Honor them. * doc/guix.texi (Base Services): Document them.
2021-03-18services: Enable "protected hardlinks" and "protected symlinks" by default.Leo Famulari
References: https://sysctl-explorer.net/fs/protected_hardlinks/ https://sysctl-explorer.net/fs/protected_symlinks/ * gnu/services/sysctl.scm (%default-sysctl-settings): New public variable. (<sysctl-configuration>): Use %default-sysctl-settings as the default value. * gnu/services/base.scm (%base-services): Add sysctl-service-type. * doc/guix.texi (Miscellaneous Services): Document the new defaults. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-01-13services: shepherd: 'shepherd-service-type' requires documentation.Ludovic Courtès
* gnu/services/shepherd.scm (shepherd-service-type): Require a 'description' form. * gnu/services/base.scm (root-file-system-service-type) (rngd-service-type, host-name-service-type): (virtual-terminal-service-type, console-keymap-service-type) (syslog-service-type, swap-service-type) (kmscon-service-type): Add description. * gnu/services/networking.scm (dhcp-client-service-type): Likewise. * gnu/system/install.scm (cow-store-service-type): Likewise. * gnu/system/linux-container.scm (dummy-networking-service-type): Likewise. * gnu/system/mapped-devices.scm (device-mapping-service-type): Likewise. * tests/guix-system.sh: Likewise.
2020-12-15services: 'references-file' depends on Guile-Gcrypt.Ludovic Courtès
Regression introduced in 6a060ff27ff68384d7c90076baa36c349fff689d. Reported by clone11 on #guix. * gnu/services/base.scm (references-file): Wrap gexp in 'with-extensions'.
2020-12-09services: guix-publish: Depend on 'avahi-daemon' when needed.Ludovic Courtès
* gnu/services/base.scm (guix-publish-shepherd-service): Add 'user-processes' to 'requirement'. When ADVERTISE? is true, also add 'avahi-daemon'.
2020-12-07service: Add shepherd discover action.Mathieu Othacehe
* gnu/services/base.scm (shepherd-discover-action): New procedure, (guix-shepherd-service)[<actions>]: add it, [<start>]: honor it. * doc/guix.texi (Invoking guix-daemon): Document it.
2020-11-29Use substitute servers on the local network.Mathieu Othacehe
* 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-29publish: Add advertising support.Mathieu Othacehe
* 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-26mapped-devices: Allow target to be list of strings.Mikhail Tsykalov
* 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-20Merge branch 'version-1.2.0' into master.Maxim Cournoyer
2020-11-18services: base: Re-export %default-substitute-urls from (guix store).Marius Bakke
* gnu/services/base.scm: Export %DEFAULT-SUBSTITUTE-URLS.
2020-11-18Merge remote-tracking branch 'upstream/version-1.2.0'Tobias Geerinckx-Rice
2020-11-18services: shepherd: Map all the invalid store characters to dash.Ludovic Courtès
Fixes a regression introduced in 977eb5d023cfdf8e336f1896480eea9cef5c04e9 whereby file system services would now have a different name. * gnu/services/base.scm (file-system->shepherd-service-name): Revert changes introduced in 977eb5d023cfdf8e336f1896480eea9cef5c04e9. * gnu/services/shepherd.scm (%store-characters): New variable (shepherd-service-file-name): Map all the characters outside %STORE-CHARACTERS to #\-.
2020-11-17Merge remote-tracking branch 'origin/version-1.2.0' into masterMaxim Cournoyer
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-16services: mingetty: Export configuration accessors.Marius Bakke
* gnu/services/base: Export configuration accessors for mingetty.
2020-11-16Properly deal with build directories containing '~'.Ludovic Courtès
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-11gnu: mingetty-shepherd-service: Make 'clear-on-logout' configurable.Mark H Weaver
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-05services: guix: Do not embed the host (guix config).Ludovic Courtès
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).