Commit Graph

274 Commits

Author SHA1 Message Date
Mark H Weaver 4307c476c4 services: Add udev rules for (upower colord elogind) to %desktop-services.
* gnu/services/desktop.scm (%desktop-services): Replace the 'udev-service'
  from %base-services.
* gnu/services/base.scm (%base-services): Add a comment to keep them in sync.
2015-09-10 19:46:13 -04:00
Ludovic Courtès 68ac258b52 system: Use the CRDA udev rules.
* gnu/services/base.scm (%base-services): Add CRDA to the #:rules of
  'udev-service'.
* gnu/system/install.scm (installation-services): Likewise.
2015-07-17 15:35:57 +02:00
Ludovic Courtès 64720891ae system: Make /dev/kvm 660.
* gnu/services/base.scm (kvm-udev-rule): Change /dev/kvm mode to 0660 as a
  followup to the resolution of <http://bugs.gnu.org/18994>.
2015-07-15 23:57:01 +02:00
Ludovic Courtès 60a56db007 services: swap: Use 'restart-on-EINTR'.
* gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'.
* guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
2015-05-22 11:51:12 +02:00
Alex Kost 5eca94594d services: Add console-keymap service.
* gnu/services/base.scm (console-keymap-service): New procedure.
* doc/guix.texi (Base Services): Document it.

Co-authored-by: 宋文武 <iyzsong@gmail.com>
2015-05-01 21:00:39 +03:00
Ludovic Courtès b86fee7848 file-systems: Use a second 'mount' call for read-only bind mounts.
* gnu/build/file-systems.scm (MS_REMOUNT): New constant.
  (mount-file-system): Add 'flags' local variable.   When FLAGS has
  MS_BIND & MS_RDONLY, call 'mount' with MS_REMOUNT.
* gnu/services/base.scm (file-system-service) <start>: Likewise.
2015-04-20 22:16:13 +02:00
Ludovic Courtès 4c9050c63d doc: Add example showing how to customize 'nscd-service'.
* doc/guix.texi (Name Service Switch): Add link to nss-mdns.  Add
  example show how to pass #:name-services to 'nscd-service'.
  (Base Services): Add link from 'nscd-service' to the above.
* gnu/services/base.scm (nscd-service): Update docstring accordingly.
2015-04-12 22:34:47 +02:00
Alex Kost 1bb76f7523 services: syslog-service: Add 'config-file' argument.
* gnu/services/base.scm (syslog-service): Add 'config-file' keyword
argument.
* doc/guix.texi (Base Services): Document it.
2015-04-01 20:54:37 +03:00
Alex Kost 52b76622e4 services: guix-service: Add service documentation.
* gnu/services/base.scm (guix-service): Add 'documentation' field to the
  service.
2015-03-26 15:49:03 +03:00
Ludovic Courtès 2d1d2dd804 services: guix-service: Add 'lsof' and 'lsh' to guix-daemon's $PATH.
* gnu/services/base.scm (guix-service): Add #:lsof and #:lsh parameters.
  [start]: Pass #:environment-variables to 'make-forkexec-constructor'.
2015-03-19 23:15:50 +01:00
Ludovic Courtès 5250a4f215 services: guix-service: Remove extraneous monadism.
* gnu/services/base.scm (guix-build-accounts): Remove unneeded
  'with-monad'.
  (guix-service): Adjust accordingly.
2015-03-17 22:25:55 +01:00
Ludovic Courtès faf0f39bd3 services: nscd: Make sure /var/db/nscd exists.
* gnu/services/base.scm (nscd-service)[activate]: Make /var/db/nscd.
2015-02-25 18:02:13 +01:00
Ludovic Courtès 4aee6e6003 services: nscd-service: Add #:name-services parameter.
* gnu/services/base.scm (nscd-service): Add #:name-services parameter.
  In 'start' field, set LD_LIBRARY_PATH based on #:name-services.
* doc/guix.texi (Base Services): Document it.
  (Name Service Switch): Link to 'nscd-service'.
2015-02-04 22:49:35 +01:00
Ludovic Courtès 6acef6811f services: mingetty: Wait for udev.
* gnu/services/base.scm (mingetty-service): Add 'udev' to
  'requirement'.
2015-01-27 10:24:34 +01:00
Ludovic Courtès 02bb6b45e4 services: guix: #:authorize-hydra-key? now defaults to #t.
* gnu/services/base.scm (guix-service): Change AUTHORIZE-HYDRA-KEY?
  default value to #t.
2015-01-23 23:49:24 +01:00
Ludovic Courtès e87f0591f3 monads: Move '%store-monad' and related procedures where they belong.
This turns (guix monads) into a generic module for monads, and moves the
store monad and related monadic procedures in their corresponding
module.

* guix/monads.scm (store-return, store-bind, %store-monad, store-lift,
  text-file, interned-file, package-file, package->derivation,
  package->cross-derivation, origin->derivation, imported-modules,
  compiled, modules, built-derivations, run-with-store): Move to...
* guix/store.scm (store-return, store-bind, %store-monad, store-lift,
  text-file, interned-file): ... here.
  (%guile-for-build): New variable.
  (run-with-store): Moved from monads.scm.  Remove default value for
  #:guile-for-build.
* guix/packages.scm (default-guile): Export.
  (set-guile-for-build): New procedure.
  (package-file, package->derivation, package->cross-derivation,
  origin->derivation): Moved from monads.scm.
* guix/derivations.scm (%guile-for-build): Remove.
  (imported-modules): Rename to...
  (%imported-modules): ... this.
  (compiled-modules): Rename to...
  (%compiled-modules): ... this.
  (built-derivations, imported-modules, compiled-modules): New
  procedures.
* gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm,
  gnu/services/dmd.scm, gnu/services/networking.scm,
  gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm,
  gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm,
  guix/gexp.scm, guix/git-download.scm, guix/profiles.scm,
  guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly.
* guix/monad-repl.scm (default-guile-derivation): New procedure.
  (store-monad-language, run-in-store): Use it.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit
  'set-guile-for-build' call.
* guix/scripts/archive.scm (derivation-from-expression): Likewise.
* guix/scripts/build.scm (options/resolve-packages): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* doc/guix.texi (The Store Monad): Adjust module names accordingly.
2015-01-14 13:34:52 +01:00
Ludovic Courtès 7bed4df49a services: user-processes: Really honor the grace delay.
* gnu/services/base.scm (user-processes-service): Change #:grace-delay
  default value to 4.  Define 'sleep*' and use it.
2015-01-13 18:16:35 +01:00
Ludovic Courtès 4a4dd5d89d services: user-processes: Write debugging messages to the output port.
* gnu/services/base.scm (user-processes-service): Write "sending all
  processes..." message to the current output port, not to /dev/console.
2015-01-12 23:33:08 +01:00
Ludovic Courtès 6454b33345 services: Make 'nscd-service' configurable; cache hosts/services by default.
Before that, as it was given an empty configuration file, nscd would
actually have all its caches disabled.

* gnu/services/base.scm (<nscd-configuration>, <nscd-cache>): New record
  types.
  (%nscd-default-caches, %nscd-default-configuration): New variables.
  (nscd.conf-file): New procedure.
  (nscd-service): Add 'config' parameter.  Use 'nscd.conf-file', and
  pass its result as the '-f' parameter of nscd.
* doc/guix.texi (Base Services): Update 'nscd-service' documentation
  accordingly.  Document 'nscd-configuration', 'nscd-cache',
  '%nscd-default-configuration', and '%nscd-default-caches'.
2014-12-14 16:29:24 +01:00
Ludovic Courtès 48bd76e009 services: user-unmount: Change directory to "/" before unmounting.
* gnu/services/base.scm (user-unmount-service): Add 'chdir' call.
2014-11-14 00:48:43 +01:00
Ludovic Courtès d6e2a622c4 services: Add 'user-unmount-service' as an essential service.
* gnu/services/base.scm (user-unmount-service): New procedure.
* gnu/system.scm (essential-services): Use it.
* gnu/system/install.scm (cow-store-service): Mention it in comment.
2014-11-10 22:42:14 +01:00
Ludovic Courtès 421c3bcc1b services: udev: Make /dev/kvm 666 as a workaround.
* gnu/services/base.scm (kvm-udev-rule): Change /dev/kvm mode to 666 to
  work around <http://bugs.gnu.org/18994>.
2014-11-08 15:10:42 +01:00
Ludovic Courtès 98c16943d5 services: Increase delay before SIGKILL is sent when halting.
* gnu/services/base.scm (user-processes-service): Increase the default
  value of 'grace-delay'.  This leaves more time for processes to clean
  up their PID files, /tmp/.X0-lock, etc.
2014-11-05 11:25:39 +01:00
Ludovic Courtès a9eef4d2e5 system: Fix value of 'EUDEV_RULES_DIRECTORY'.
* gnu/services/base.scm (udev-service): Append "/lib/udev/rules.d" to
  EUDEV_RULES_DIRECTORY.
2014-09-19 17:23:17 +02:00
Ludovic Courtès 7f28bf9a43 system: Add udev rule for /dev/kvm.
* gnu/services/base.scm (kvm-udev-rule): New procedure.
  (udev-service): Use it, and add it to RULES.
  (guix-build-accounts): Add "kvm" to the 'supplementary-groups' field.
* gnu/system/shadow.scm (%base-groups): Add "kvm".
2014-09-18 23:23:46 +02:00
Ludovic Courtès 2a13d05e45 system: Add support for swap devices.
* gnu/services/base.scm (swap-service): New procedure.
* gnu/system.scm (<operating-system>)[swap-devices]: New field.
  (swap-services): New procedure.
  (essential-services): Use it.
2014-09-18 22:52:01 +02:00
Ludovic Courtès 722554a306 system: Define 'device-mapping-kind', and add a 'close' procedure.
* gnu/system/file-systems.scm (<mapped-device-type>): New record type.
  (<mapped-device>)[command]: Remove field.
  [type]: New field.
* gnu/services/base.scm (device-mapping-service): Rename 'command'
  parameter to 'open'.  Add 'close' parameter and honor it.
* gnu/system.scm (luks-device-mapping): Rename to...
  (open-luks-device): ... this.
  (close-luks-device): New procedure.
  (luks-device-mapping): New variable.
  (device-mapping-services): Get the type of MD, and pass its 'open' and
  'close' fields to 'device-mapping-service'.
2014-09-18 19:18:39 +02:00
Ludovic Courtès 6a3f4c74fd services: file-system: Change directory to root before unmounting.
* gnu/services/base.scm (file-system-service)[stop]: Add 'chdir' call.
2014-09-17 09:20:38 +02:00
Ludovic Courtès d656c14ec9 services: user-processes: Wait for complete process termination.
* gnu/services/base.scm (user-processes-service): Add 'wait' loop.
2014-09-17 09:19:48 +02:00
Ludovic Courtès 66d5d8c072 services: udev: Make non-respawnable.
* gnu/services/base.scm (udev-service): Add 'respawn?' field.
2014-09-17 08:59:13 +02:00
Ludovic Courtès 8a7330fd76 system: Use eudev instead of udev by default.
* gnu/system.scm (%base-packages): Change 'udev' to 'eudev'.
* gnu/services/base.scm (udev-service): Change #:udev to default to
  'eudev'.
2014-09-13 10:54:47 +02:00
Ludovic Courtès 66a99a0676 services: udev: Allow the use of eudev.
* gnu/services/base.scm (udev-service): Adjust 'start' method to support
  eudev in addition to udev.
2014-09-13 10:53:47 +02:00
Ludovic Courtès 52bd573421 system: Add FUSE and ALSA udev rules by default.
* gnu/services/base.scm (%base-services): Pass FUSE and ALSA-UTILS to
  'udev-service'.
2014-09-13 10:50:26 +02:00
Ludovic Courtès 5dae0186de system: Add support for Linux-style mapped devices.
* gnu/system/file-systems.scm (<mapped-device>): New record type.
* gnu/system.scm (<operating-system>)[mapped-devices]: New field.
  (luks-device-mapping): New procedure.
  (other-file-system-services)[device-mappings, requirements]: New
  procedures.  Pass #:requirements to 'file-system-service'.
  (device-mapping-services): New procedure.
  (essential-services): Use it.  Append its result to the return value.
  (operating-system-initrd-file): Add comment.
* gnu/services/base.scm (file-system-service): Add #:requirements
  parameter and honor it.
  (device-mapping-service): New procedure.
* gnu/system/linux-initrd.scm (base-initrd): Add comment.
2014-09-12 00:14:52 +02:00
Ludovic Courtès ecd06ca9fa services: udev: Allow for additional udev rules.
* gnu/services/base.scm (udev-rules-union): New procedure.
  (udev-service): Add #:rules parameter.  Call 'udev-rules-union' and
  create udev.conf.  Set $UDEV_CONFIG_FILE before spawning udevd.
2014-09-12 00:14:52 +02:00
Ludovic Courtès e2f4b305d0 Move part of (gnu build linux-boot) to (gnu build file-systems).
* gnu/build/linux-boot.scm (%ext2-endianness, %ext2-sblock-magic,
  %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name,
  read-ext2-superblock, ext2-superblock-uuid,
  ext2-superblock-volume-name, disk-partitions,
  partition-label-predicate, find-partition-by-label,
  canonicalize-device-spec, MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC,
  MS_BIND, MS_MOVE, bind-mount, check-file-system,
  mount-flags->bit-mask, mount-file-system): Move to...
* gnu/build/file-systems.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/base.scm: Use (gnu build file-systems).
* gnu/services/dmd.scm (dmd-configuration-file): Likewise.
* gnu/system.scm (operating-system-activation-script): Likewise.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-09-03 15:43:07 +02:00
Ludovic Courtès 8a9e21d1f7 Rename (gnu build linux-initrd) to (gnu build linux-boot).
* gnu/build/linux-initrd.scm: Rename to...
* gnu/build/linux-boot.scm: ... this.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/build/activation.scm, gnu/build/vm.scm, gnu/services/base.scm,
  gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm,
  gnu/system/vm.scm: Adjust accordingly.
2014-09-03 15:43:07 +02:00
Ludovic Courtès 548f7a8fa2 Move operating system helpers from (guix build …) to (gnu build …).
* guix/build/activation.scm, guix/build/install.scm,
  guix/build/linux-initrd.scm, guix/build/vm.scm: Move to...
* gnu/build: ... here.
* Makefile.am (MODULES): Remove the above guix/build/ files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files
  here.
* gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm,
  gnu/system/linux-initrd.scm, gnu/system/vm.scm,
  guix/scripts/system.scm: Adjust to the new module names.
2014-09-03 15:43:07 +02:00
Ludovic Courtès bdb36958fb gnu: Split (gnu packages base), adding (gnu packages commencement).
* gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0,
  findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet,
  binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0,
  texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash,
  cross-gcc-wrapper, static-bash-for-glibc, glibc-final,
  gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++,
  gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs,
  guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final,
  %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain,
  gcc-toolchain-4.8, gcc-toolchain-4.9): Move to...
* gnu/packages/commencement.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/check-final-inputs-self-contained.scm: Adjust accordingly.
* gnu/packages/cross-base.scm: Likewise.
* gnu/packages/make-bootstrap.scm: Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/gnu.scm (standard-packages, gnu-build,
  gnu-cross-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* guix/download.scm (url-fetch): Likewise.
* guix/gexp.scm (default-guile): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/monads.scm (run-with-store): Likewise.
* guix/packages.scm (default-guile): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths):
  Likewise.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh: Likewise.
* gnu/services/base.scm: Use 'canonical-package' instead of xxx-final.
* gnu/services/xorg.scm: Likewise.
* gnu/system/vm.scm: Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2014-08-28 09:21:54 +02:00
Ludovic Courtès 417175096a services: Use system groups where applicable.
* gnu/services/avahi.scm (avahi-service): Add 'system?' field to
  'user-group' form.
* gnu/services/base.scm (guix-service): Likewise.
* gnu/services/dbus.scm (dbus-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
2014-07-25 00:15:46 +02:00
Ludovic Courtès 2c071ce96e system: Recognize more file system flags.
* guix/build/linux-initrd.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC): New
  variables.
  (mount-flags->bit-mask): New procedure.
  (mount-file-system)[flags->bit-mask]: Remove.
  Use 'mount-flags->bit-mask' instead.
  In /etc/mtab, use the empty string when OPTIONS is false.
* gnu/services/base.scm (file-system-service): Add #:flags parameter and
  honor it.
* gnu/system.scm (other-file-system-services): Pass FLAGS to
  'file-system-service'.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 7f239fd33f system: Add 'file-system' decl. for /dev/pts, and use the right options.
Fixes <http://bugs.gnu.org/18081>.

* gnu/system/file-systems.scm (%devtmpfs-file-system): Add
  'needed-for-boot?' field.
  (%tty-gid, %pseudo-terminal-file-system): New variables.
  (%base-file-systems): Add %PSEUDO-TERMINAL-FILE-SYSTEM.
* gnu/services/base.scm (udev-service): Remove dependency on
  'file-system-/dev'.
* gnu/system/shadow.scm (%base-groups): Add 'id' field for group 'tty'.
* guix/build/linux-initrd.scm (boot-system): Remove 'mount' call for
  /dev/pts.
* doc/guix.texi (File Systems): Add %pseudo-terminal-file-system.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 4e469051a7 system: Add 'create-mount-point?' file system option.
* gnu/system/file-systems.scm (<file-system>)[create-mount-point?]: New
  field.
* gnu/services/base.scm (file-system-service): Add #:create-mount-point?
  parameter and honor it.
* gnu/system.scm (other-file-system-services): Update
  'file-system-service' call accordingly.
* doc/guix.texi (File Systems): Document it.
2014-07-23 02:02:06 +02:00
Ludovic Courtès a69576ea85 system: Add '%devtmpfs-file-system' for udev, and '%base-file-systems'.
Suggested by Adam Pribyl <pribyl@lowlevel.cz>.

* gnu/services/base.scm (udev-service)[requirement]: Add
  'file-system-/dev'.
* gnu/system/file-systems.scm (%devtmpfs-file-system,
  %base-file-systems): New variables.
* gnu/system/install.scm (installation-services)[file-systems]: Use
  %base-file-systems.
* build-aux/hydra/demo-os.scm (file-systems): Likewise.
* doc/guix.texi (System Installation): Show %BASE-FILE-SYSTEMS in the
  example.
  (Using the Configuration System): Likewise.
  (File Systems): Document %base-file-systems, %devtmpfs-file-system,
  %binary-format-file-system, and %fuse-control-file-system.
2014-07-22 16:59:10 +02:00
Ludovic Courtès 1b09031f78 services: Allow 'check-file-system' to work for non-boot-time file systems.
* gnu/services/base.scm (file-system-service)[start]: Set $PATH so that
  fsck.* can be found.  Reported by "DusXMT".
2014-07-21 23:18:21 +02:00
Ludovic Courtès 62ca0fdf9e services: Add 'console-font-service'.
* gnu/services/base.scm (unicode-start, console-font-service): New
  procedures.
  (%base-services): Call 'console-font-service' for TTY1 to TTY6.
* gnu/system/install.scm (installation-services): Add comment about the
  console font.  Call 'console-font-service' for TTY1 to TTY6.
2014-07-17 15:53:01 +02:00
Ludovic Courtès 6a1912743a services: syslog: Don't write trivial error messages to /dev/console.
* gnu/services/base.scm (syslog-service): Change "*.err" to "*.alert".
2014-07-16 22:40:14 +02:00
Ludovic Courtès c11a6eb1e5 services: Add options to 'guix-service'.
* gnu/services/base.scm (guix-service): Add #:use-substitutes? and
  #:extra-options parameters, and honor them.
* doc/guix.texi (Base Services): Adjust accordingly.
2014-07-14 15:51:22 +02:00
Ludovic Courtès 4a3b3b073a services: Provide a 'loopback' service by default.
* gnu/services/networking.scm (static-networking-service): Add
  #:provision parameter; use it.
* gnu/services/base.scm (%base-services): Call
  'static-networking-service' for "lo".
2014-07-12 23:17:53 +02:00
Ludovic Courtès 51da7ca095 services: Use more Texinfo markup in docstrings.
* gnu/services/base.scm (host-name-service): Use Texinfo markup.
  (mingetty-service): Comment on #:allow-empty-passwords?.  Improve
  markup.
  (syslog-service, guix-service): Use Texinfo markup.
* gnu/services/networking.scm (static-networking-service): Likewise.
* gnu/services/xorg.scm (slim-service): Likewise.
2014-07-11 23:20:48 +02:00
Ludovic Courtès ed09bb11cd services: udev: Improve synchronization when starting.
* gnu/services/base.scm (udev-service)[start]: Add 'wait-for-udevd', and
  call it before running 'udevadm trigger'.  Pass --action=add to
  'udevadm trigger'.  Call 'udevadm settle' after 'udevadm trigger'.
2014-07-10 00:35:27 +02:00
Ludovic Courtès 1c6b445b40 services: Update to use the dmd 0.2 API.
* gnu/services/avahi.scm (avahi-service)[start]: Wrap command in a
  list.
* gnu/services/dbus.scm (dbus-service)[start]: Likewise.
* gnu/services/ssh.scm (lsh-service): Likewise.
* gnu/services/base.scm (mingetty-service)[start]: Likewise.
  (nscd-service)[start]: Likewise.
  (syslog-service)[start]: Likewise.
  (guix-service)[start]: Likewise.
  (udev-service)[start]: Use 'exec-command' instead of 'execl'.
* gnu/services/xorg.scm (slim-service)[start]: Likewise, and use
  #:environment-variables.
2014-07-08 00:12:31 +02:00
Ludovic Courtès 081c5b2d66 services: udev: Make sure modules are found, and use "udevadm settle".
* gnu/services/base.scm (udev-service): Set $LINUX_MODULE_DIRECTORY.  In
  the parent, invoke "udevadm settle" before "udevadm trigger".
2014-06-29 22:06:29 +02:00
Ludovic Courtès 459dd9eaf2 system: Add a 'system?' field to user accounts.
* gnu/system/shadow.scm (<user-account>)[system?]: New field.
* gnu/system.scm (user-account->gexp): Add it.
* guix/build/activation.scm (add-user): Add #:system? parameter and
  honor it.
  (activate-users+groups): Handle the 'system?' part of user tuples.
  Pass it to 'add-user'.  Don't create PROFILE-DIR when SYSTEM? is
  true.
* gnu/services/dbus.scm (dbus-service): Add 'system?' field for
  "messagebus" account.
* gnu/services/base.scm (guix-build-accounts): Likewise.
* gnu/services/avahi.scm (avahi-service): Likewise.
2014-06-27 19:06:08 +02:00
Ludovic Courtès 151a2c07aa services: Add udev service, and add it to '%base-services'.
* gnu/services/base.scm (udev-service): New procedure.
  (%base-services): Use it.
* gnu/system.scm (%base-packages): Add UDEV.
2014-06-24 00:20:01 +02:00
Ludovic Courtès 72507e23b5 system: Remove useless 'members' field of 'user-group'.
* gnu/system/shadow.scm (<user-group>)[members]: Remove field.
* gnu/system/install.scm (installation-os)[users]: Remove 'members'
  fields.  Use 'supplementary-groups' for 'guest'.
* build-aux/hydra/demo-os.scm (users): Likewise.
* gnu/services/base.scm (guix-service): Remove 'members' field.
2014-06-22 21:48:35 +02:00
Ludovic Courtès e97c5be914 services: Use a fixed GID for the build group and use that for the store.
This partly reverts commit 185f669 ("services: Make sure the store's
group is the build group.")

* gnu/services/base.scm (guix-service)[activate]: Remove 'chown' call.
  Add 'id' field to 'user-group' form.
* guix/build/install.scm (directives): Set the store's GID to 30000.
2014-06-06 00:28:21 +02:00
Ludovic Courtès 185f669109 services: Make sure the store's group is the build group.
* gnu/services/base.scm (guix-service)[activate]: New variable.  Add
  'chown' call for (%store-prefix).  Set the 'activate' field to
  ACTIVATE.
* guix/build/install.scm (directives): Add comment about STORE's group.
2014-06-04 22:19:30 +02:00
Ludovic Courtès 3d116a70f9 services: Add the build group to the supplementary groups of build users.
* gnu/services/base.scm (guix-build-accounts): Add
  'supplementary-groups' field.
2014-06-04 22:17:20 +02:00
Ludovic Courtès 2c5c696c39 install: Register the hydra.gnu.org key on the installation image.
* gnu/services/base.scm (hydra-key-authorization): New procedure.
  (guix-service): Add #:authorize-hydra-key? parameter; honor it using
  'hydra-key-authorization'.
* gnu/system/install.scm (installation-services): Pass
  #:authorize-hydra-key? #t.
2014-06-04 18:15:50 +02:00
Ludovic Courtès d4c87617e5 system: File system sources can be marked as labels or devices.
* gnu/system/file-systems.scm (<file-system>)[title]: New field.
* gnu/services/base.scm (file-system-service): Add #:title parameter.
  In 'start' gexp, use 'canonicalize-device-spec' and honor TITLE.
* gnu/system.scm (other-file-system-services,
  operating-system-root-file-system, operating-system-initrd-file):
  Adjust accordingly.
* gnu/system/linux-initrd.scm (file-system->spec): Likewise.
* gnu/system/vm.scm (system-disk-image): Add 'title' field for the root
  file system.
* guix/build/linux-initrd.scm (mount-file-system): Expect the second
  element of SPEC to be the title.
  (boot-system)[root-mount-point?, root-fs-type]: Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Select
  'canonicalize-device-spec'.
2014-06-03 00:14:58 +02:00
Ludovic Courtès 1f3fc60da5 services: syslogd: Write fewer messages to /dev/console.
* gnu/services/base.scm (syslog-service)[contents]: Remove "kern.*" from
  /dev/console.
2014-06-01 23:51:59 +02:00
Ludovic Courtès 52322163ac system: Add more options for 'mingetty-service'.
* gnu/services/base.scm (mingetty-service): Add #:auto-login,
  #:login-program, and #:login-pause? parameters and honor them.
2014-05-31 21:51:04 +02:00
Ludovic Courtès 4b2615e1ca services: nscd: Provide an 'activate' script to make /var/run/nscd.
* gnu/services/base.scm (nscd-service): Add 'activate' field.
* guix/build/install.scm (directives): Remove /var/run/nscd; add
  /var/run.
* doc/guix.texi (Defining Services): Add 'activate' field in example.
  Document it.
2014-05-24 18:10:05 +02:00
Ludovic Courtès 7d57cfd3b6 system: When unionfs-fuse is used for /, don't kill it when halting.
* guix/build/linux-initrd.scm (pidof): New procedure.
  (mount-root-file-system)[mark-as-not-killable]: New procedure.
  Use it for unionfs when VOLATILE-ROOT?.
* gnu/services/base.scm (%do-not-kill-file): New variable.
  (user-processes-service)[stop]: Honor it.
2014-05-14 19:07:03 +02:00
Ludovic Courtès ab6a279abb system: Make accounts and groups at activation time.
* gnu/services/base.scm (guix-build-accounts): Remove #:gid parameter;
  add #:group.  Remove 'password' and 'gid' fields in 'user-account'
  form, and add 'group'.
  (guix-service): Remove #:build-user-gid parameter.  Remove 'id' field
  in 'user-group' form.
* gnu/system.scm (etc-directory): Remove #:groups and #:accounts.  No
  longer produce files "passwd", "shadow", and "group".  Adjust caller
  accordingly.
  (%root-account): New variable.
  (operating-system-accounts): Add 'users' variable.  Add %ROOT-ACCOUNT
  only of 'operating-system-users' doesn't already contain a root
  account.
  (user-group->gexp, user-account->gexp): New procedures.
  (operating-system-boot-script): Add calls to 'setenv' and
  'activate-users+groups' in gexp.
* gnu/system/linux.scm (base-pam-services): Add PAM services for
  "user{add,del,mode}" and "group{add,del,mod}".
* gnu/system/shadow.scm (<user-account>)[gid]: Rename to...
  [group]: ... this.
  [supplementary-groups]: New field.
  [uid, password]: Default to #f.
  (<user-group>)[id]: Default to #f.
  (group-file, passwd-file): Remove.
* gnu/system/vm.scm (operating-system-default-contents)[user-directories]:
  Remove.  Add "/home" to the directives.
* guix/build/activation.scm (add-group, add-user,
  activate-users+groups): New procedures.
2014-05-11 22:41:58 +02:00
Ludovic Courtès 023f391c78 services: Add 'file-system-service'.
* gnu/services/base.scm (file-system-service): New procedure.
  (user-processes-service): Add 'requirements' parameter.
* gnu/services/dmd.scm (dmd-configuration-file): Use (guix build
  linux-initrd).
* guix/build/linux-initrd.scm (guix): Export 'check-file-system'.
* gnu/system.scm (file-union): New procedure.
  (essential-services): Use it.  Add that to the returned list.
2014-05-10 23:33:52 +02:00
Ludovic Courtès 23ed63a12d services: Use (guix build syscalls) instead of util-linux.
* gnu/services/dmd.scm (dmd-configuration-file): Add derivations for
  the (guix build syscalls) module, and add that to the load path of
  dmd.conf.
* gnu/services/base.scm (root-file-system-service): Rewrite using the
  'sync' and 'mount' procedures.
2014-05-10 22:58:22 +02:00
Ludovic Courtès 217a5b852e system: Automatically add essential services.
* gnu/services/base.scm (%base-services): Remove calls to
  'host-name-service', 'user-processes-service', and
  'root-file-system-service'.
* gnu/system.scm (<operating-system>)[operating-system-services]: Rename
  to...
  [operating-system-user-services]: ... this.
  (essential-services, operating-system-services): New procedures.
  (operating-system-accounts, operating-system-etc-directory,
  operating-system-boot-script, operating-system-derivation): Adjust to
  new 'operating-system-services' return type.
2014-05-09 22:59:18 +02:00
Ludovic Courtès a00dd9fbf4 services: Add service to cleanly unmount the root file system.
* gnu/services/base.scm (root-file-system-service,
  user-processes-service): New procedures.
  (mingetty-service, nscd-service, syslog-service, guix-service): Add
  requirement on 'user-processes'.
  (%base-services): Add (user-processes-service)
  and (root-file-system-service).
* gnu/services/xorg.scm (slim-service): Add requirement on
  'user-processes'.
2014-05-08 23:42:15 +02:00
Ludovic Courtès b5f4e68635 services: Rewrite using gexps.
* gnu/services.scm (<service>)[inputs]: Remove.
* gnu/system.scm (links): Remove.
  (etc-directory): Add PASSWD and SHADOW to #:inputs.
  (operating-system-boot-script): Pass ETC to 'dmd-configuration-file'.
  (operating-system-derivation): Remove EXTRAS from the union.
* gnu/system/linux.scm (pam-service->configuration): Rewrite in terms of
  'gexp->derivation'.  Compute the contents on the build side.  Expect
  'arguments' to contain a list of gexps.
  (pam-services->directory): Rewrite in terms of 'gexp->derivation'.
  (unix-pam-service): Change 'arguments' to a list of one gexp.
* gnu/system/shadow.scm (<user-account>)[inputs]: Remove.
  [shell]: Change default value to a gexp.
  (passwd-file): Rewrite in terms of 'gexp->derivation'.  Compute
  contents on the build side.
* gnu/services/base.scm (host-name-service, mingetty-service,
  nscd-service, syslog-service, guix-service): Change 'start' and 'stop'
  to gexps; remove 'inputs' field.
  (guix-build-accounts): Change 'shell' field to a gexp.
* gnu/services/networking.scm (static-networking-service): Change
  'start' and 'stop' to gexps; remove 'inputs' field.
* gnu/services/xorg.scm (slim-service): Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Expect ETC to be a
  derivation.  Change 'config' to a gexp.  Use 'gexp->file' instead of
  'text-file'.
* doc/guix.texi (Defining Services): Update nscd example with gexps, and
  without 'inputs'.  Add xref to "G-Expressions".
2014-04-28 23:24:18 +02:00
Ludovic Courtès 0b6f49ef69 system: Factorize (gnu system).
* gnu/system.scm (operating-system-accounts,
  operating-system-etc-directory): New procedures.
  (operating-system-derivation): Use them.
* gnu/services/base.scm (%base-services): Add 'host-name-service'
  invocation.
2014-04-23 15:47:42 +02:00
Ludovic Courtès 8b198abecd gnu: Define '%base-services'.
* gnu/services/base.scm (%base-services): New variable.
* gnu/system.scm (<operating-system>)[services]: Change the default
  value to %BASE-SERVICES.
* doc/guix.texi (Using the Configuration System): Change
  '%standard-services' to '%base-services'.
2014-02-19 21:08:28 +01:00
Ludovic Courtès db4fdc04cc gnu: Introduce the (gnu services ...) modules.
* gnu/system/dmd.scm: Remove file.  Move contents to...
* gnu/services.scm, gnu/services/base.scm, gnu/services/dmd.scm,
  gnu/services/networking.scm, gnu/services/xorg.scm: ... here.  New
  files.
* gnu/system.scm, gnu/system/vm.scm: Adjust accordingly.
* guix/scripts/system.scm (%user-module): Likewise.
* doc/guix.texi (Using the Configuration System): Likewise.
  (Defining Services): Likewise.
2014-02-19 20:58:24 +01:00