summaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
Commit message (Collapse)AuthorAge
* services: guix-publish: Add negative-ttl parameter.Guillaume Le Vaillant2022-01-20
| | | | | | | | * 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.
* daemon: Always default to gzip for log compression.Ludovic Courtès2022-01-18
| | | | | | | | * 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.
* services: guix: Add tar and gzip to PATH.Timothy Sample2022-01-16
| | | | | * gnu/services/base.scm (guix-shepherd-service): Add the PATH environment-variable and populate it with tar and gzip.
* services: networking: Add netmask to loopback address.Ludovic Courtès2022-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* services: static-networking: Enable multicast by default.Mathieu Othacehe2021-12-21
| | | | | | Fixes: <https://issues.guix.gnu.org/52520>. * gnu/services/base.scm (network-set-up/linux): Enable it.
* services: static-networking: Sanitize <network-address> values.Ludovic Courtès2021-12-20
| | | | | | | | 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'.
* services: Define '%loopback-static-networking'.Ludovic Courtès2021-12-12
| | | | | | | | * 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.
* services: Define '%qemu-static-networking'.Ludovic Courtès2021-12-12
| | | | | | * 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.
* services: static-networking: Change interface to mimic netlink.Ludovic Courtès2021-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* services: static-networking: Use Guile-Netlink on GNU/Linux.Ludovic Courtès2021-12-12
| | | | | | | * 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'.
* services: Accept <inferior-package>s in lieu of <package>s.Tobias Geerinckx-Rice2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* gnu: system: Make old-style swap use default flags.Josselin Poiret2021-11-23
| | | | | | | * 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>
* system: Add swap flags.Josselin Poiret2021-11-23
| | | | | | | | | | | * 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>
* system: Rework swap space support, add dependencies.Josselin Poiret2021-11-23
| | | | | | | | | | | | * 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>
* services: base: Honor file-system-create-mount-point? at all times.Maxim Cournoyer2021-08-29
| | | | | | | | | | 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.
* services: pam-limits: fix limits.conf locationmuradm2021-08-07
| | | | | | | | * gnu/services/base.scm: fix limits.conf location This fixes #49771 Signed-off-by: Julien Lepiller <julien@lepiller.eu>
* services: guix: Use "match-record" in activation.Brice Waegeneire2021-08-04
| | | | | | | | 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".
* services: gpm: Use "make-forkexec-contstructor".Brice Waegeneire2021-07-13
| | | | | * gnu/services/base.scm (gpm-shepherd-service)[start]: Replace custom logic with "make-forkexec-constructor".
* services: kmscon: Add keyboard-layout fields.luhui2021-06-29
| | | | | | | * 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>
* services: guix: Authorize 'bordeaux.guix.gnu.org.pub' by default.Jack Hill2021-06-19
| | | | | | | | | 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>
* services: Remove deprecated service procedures.Ludovic Courtès2021-06-14
| | | | | | | | | | | | | | | 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.
* services: guix-publish: Add zstd compression by default.Ludovic Courtès2021-04-03
| | | | | | | | | | | 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.
* services: kmscon: Add font-engine and font-size fields.qblade2021-04-01
| | | | | | | * 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.
* services: Enable "protected hardlinks" and "protected symlinks" by default.Leo Famulari2021-03-18
| | | | | | | | | | | | | | 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>
* services: shepherd: 'shepherd-service-type' requires documentation.Ludovic Courtès2021-01-13
| | | | | | | | | | | | | | | | | * 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.
* services: 'references-file' depends on Guile-Gcrypt.Ludovic Courtès2020-12-15
| | | | | | | | Regression introduced in 6a060ff27ff68384d7c90076baa36c349fff689d. Reported by clone11 on #guix. * gnu/services/base.scm (references-file): Wrap gexp in 'with-extensions'.
* services: guix-publish: Depend on 'avahi-daemon' when needed.Ludovic Courtès2020-12-09
| | | | | | * gnu/services/base.scm (guix-publish-shepherd-service): Add 'user-processes' to 'requirement'. When ADVERTISE? is true, also add 'avahi-daemon'.
* service: Add shepherd discover action.Mathieu Othacehe2020-12-07
| | | | | | | * 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.
* Use substitute servers on the local network.Mathieu Othacehe2020-11-29
| | | | | | | | | | | | | | | * 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.
* publish: Add advertising support.Mathieu Othacehe2020-11-29
| | | | | | | | | | | | | * 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.
* mapped-devices: Allow target to be list of strings.Mikhail Tsykalov2020-11-26
| | | | | | | | | | | * 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>
* Merge branch 'version-1.2.0' into master.Maxim Cournoyer2020-11-20
|\
| * services: base: Re-export %default-substitute-urls from (guix store).Marius Bakke2020-11-18
| | | | | | | | * gnu/services/base.scm: Export %DEFAULT-SUBSTITUTE-URLS.
* | Merge remote-tracking branch 'upstream/version-1.2.0'Tobias Geerinckx-Rice2020-11-18
|\|
| * services: shepherd: Map all the invalid store characters to dash.Ludovic Courtès2020-11-18
| | | | | | | | | | | | | | | | | | | | | | | | 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 #\-.
* | Merge remote-tracking branch 'origin/version-1.2.0' into masterMaxim Cournoyer2020-11-17
|\| | | | | | | | | | | | | | | 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.
| * services: mingetty: Export configuration accessors.Marius Bakke2020-11-16
| | | | | | | | * gnu/services/base: Export configuration accessors for mingetty.
| * Properly deal with build directories containing '~'.Ludovic Courtès2020-11-16
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | gnu: mingetty-shepherd-service: Make 'clear-on-logout' configurable.Mark H Weaver2020-11-11
|/ | | | | | | | | | | 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.
* services: guix: Do not embed the host (guix config).Ludovic Courtès2020-11-05
| | | | | | | | 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).
* services: guix-publish: Add 'cache-bypass-threshold' field.Ludovic Courtès2020-10-30
| | | | | | | | This is a followup to ecaa102a58ad3ab0b42e04a3d10d7c761c05ec98. * gnu/services/base.scm (<guix-publish-configuration>)[cache-bypass-threshold]: New field. (guix-publish-shepherd-service): Honor it.
* services: swap: Allow for UUIDs and file system labels.Ludovic Courtès2020-10-30
| | | | | | | | * 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.
* services: guix: Make /etc/guix/acl really declarative by default.Ludovic Courtès2020-10-25
| | | | | | | | | | | | 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.
* services: guix: Generate key pair if needed during activation.Ludovic Courtès2020-09-29
| | | | | | | | * gnu/services/base.scm (guix-activation): Invoke "guix archive --generate-key". * doc/guix.texi (Invoking guix archive) (Invoking guix deploy): Mention that 'guix-service-type' takes care of generating the key pair.
* services: base: Improve container related comments.Mathieu Othacehe2020-09-21
| | | | | * gnu/services/base.scm (guix-shepherd-service): Clarify the usage of a container for guix-daemon.
* installer: Run the installation inside a container.Mathieu Othacehe2020-09-02
| | | | | | | | | | | | | | | | | | | When the store overlay is mounted, other processes such as kmscon, udev and guix-daemon may open files from the store, preventing the underlying install support from being umounted. See: https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00161.html. To avoid this situation, mount the store overlay inside a container, and run the installation from within that container. * gnu/build/shepherd.scm (fork+exec-command/container): New procedure. * gnu/services/base.scm (guix-shepherd-service): Support an optional PID argument passed to the "start" method. If that argument is passed, ensure that guix-daemon enters the given PID MNT namespace by using fork+exec-command/container procedure. * gnu/installer/final.scm (umount-cow-store): Remove it, (install-system): run the installation from within a container. * gnu/installer/newt/final.scm (run-install-shell): Remove the display hack.
* Remove "guile-zlib" extension when unused.Mathieu Othacehe2020-08-25
| | | | | | | | | | | | | | | | This is a follow-up of 755f365b02b42a5d1e8ef3000dadef069553a478. As (zlib) is autoloaded in (gnu build linux-modules), "guile-zlib" is needed as an extension only when it is effectively used. * gnu/installer.scm (installer-program): Remove "guile-zlib" from the extensions. * gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto. * gnu/services.scm (activation-script): Ditto. * gnu/services/base.scm (default-serial-port): Ditto, (agetty-shepherd-service): ditto, (udev-service-type): ditto. * gnu/system/image.scm (gcrypt-sqlite3&co): Ditto. * gnu/system/shadow.scm (account-shepherd-service): Ditto.
* linux-libre: Support module compression.Mathieu Othacehe2020-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for GZIP compression for linux-libre kernel modules. The initrd modules are kept uncompressed as the initrd is already compressed as a whole. The linux-libre kernel also supports XZ compression, but as Guix does not have any available bindings for now, and the compression time is far more significant, GZIP seems to be a better option. * gnu/build/linux-modules.scm (modinfo-section-contents): Use 'call-with-gzip-input-port' to read from a module file using '.gz' extension, (strip-extension): new procedure, (dot-ko): adapt to support compression, (ensure-dot-ko): ditto, (file-name->module-name): ditto, (find-module-file): ditto, (load-linux-module*): ditto, (module-name->file-name/guess): ditto, (module-name-lookup): ditto, (write-module-name-database): ditto, (write-module-alias-database): ditto, (write-module-device-database): ditto. * gnu/installer.scm (installer-program): Add "guile-zlib" to the extensions. * gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto. * gnu/services.scm (activation-script): Ditto. * gnu/services/base.scm (default-serial-port): Ditto, (agetty-shepherd-service): ditto, (udev-service-type): ditto. * gnu/system/image.scm (gcrypt-sqlite3&co): Ditto. * gnu/system/linux-initrd.scm (flat-linux-module-directory): Add "guile-zlib" to the extensions and make sure that the initrd only contains uncompressed module files. * gnu/system/shadow.scm (account-shepherd-service): Add "guile-zlib" to the extensions. * guix/profiles.scm (linux-module-database): Ditto.
* services: base: Export references-file.Oleg Pykhalov2020-07-22
| | | | * gnu/services/base.scm (references-file): Export procedure.
* services: Remove obsolete comment.Marius Bakke2020-07-12
| | | | | | This TODO was resolved in ea4915a74bc4c03495d4910c1e32a92c790b6626. * gnu/services/base.scm (%default-authorized-guix-keys): Remove TODO comment.