Commit graph

79 commits

Author SHA1 Message Date
Andrew Tropin a4dfbead19
system: Source .profile in skeleton bash_profile.
Make it consistent with bash_profile generated by Guix Home.

* gnu/system/shadow.scm (default-skeletons)[bash_profile]: Source .profile in
skeleton bash_profile.
2023-02-08 18:13:08 +04:00
Ludovic Courtès 086df6ef21
system: Define default 'PS1' in /etc/bashrc rather than ~/.bashrc.
Users can override 'PS1' in ~/.bashrc if they wish.

Previously, on Guix Home, the "default" 'PS1' would be set in ~/.bashrc
when 'home-bash-configuration-guix-defaults?' is true, preventing users
from overriding it via the 'environment-variables' field of
'home-bash-extension'.

* gnu/system/shadow.scm (%default-bashrc): Remove 'PS1' setting.
* gnu/system.scm (operating-system-etc-service): Define PS1 in
/etc/bashrc.
* gnu/home/services/shells.scm (add-bash-configuration): When
'home-bash-configuration-guix-defaults?' is true, add a default 'PS1' to
~/.bash_profile.
2023-01-05 15:00:27 +01:00
Ludovic Courtès 2127e56bd8
system, home: Factorize default '.bashrc'.
* gnu/system/shadow.scm (%default-bashrc): New variable.  Source
/etc/bashrc only if it exists.
(default-skeletons): Use it.
* gnu/home/services/shells.scm (guix-bashrc): Remove.
(add-bash-configuration): Refer to '%default-bashrc' instead.
2023-01-05 14:21:19 +01:00
Christopher Baines e740cc6140
Merge branch 'master' into core-updates 2021-02-03 09:57:35 +00:00
Leo Prikler 6c5112dbb3
services: Do not warn, when duplicate users are eq?.
* gnu/system/shadow.scm (account-activation): Delete duplicate (eq?) users
and groups before transforming them to specs and asserting, that names are
unique.
2021-01-20 09:04:59 +01:00
Leo Prikler 239af11a69
shadow: End duplicate warnings with new lines.
The change from formatted message causes the line to no longer automatically
be ended.  This will need to be reverted once again, when duplicate names
become hard errors.

* gnu/system/shadow.scm (assert-unique-account-names)
(assert-unique-group-names): End format strings in ~%.
2021-01-20 09:04:57 +01:00
Leo Prikler 645a28ee97
Reapply "system: Assert, that user and group names are unique."
* gnu/system/shadow.scm (assert-unique-account-names)
(assert-unique-group-names): Demote formatted-message to warning.
2021-01-13 00:44:34 +01:00
Jonathan Brielmaier 8488f45b6e
Revert "system: Assert, that user and group names are unique."
This reverts commit a3002104a8, which
breaks certain system configurations like:

$ guix system reconfigure config.scm
guix system: error: the following groups appear more than once: lp
2021-01-12 23:53:53 +01:00
Leo Prikler a3002104a8
system: Assert, that user and group names are unique.
*gnu/system/shadow.scm (find-duplicates): New variable.
(assert-unique-account-names, assert-unique-group-names): New variables.
(account-activation): Use them here.
2021-01-11 16:03:47 +01:00
Mathieu Othacehe dac7dd1b0b
Remove "guile-zlib" extension when unused.
This is a follow-up of 755f365b02.

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.
2020-08-25 12:39:11 +02:00
Mathieu Othacehe 755f365b02
linux-libre: Support module compression.
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.
2020-08-25 11:53:20 +02:00
Maxim Cournoyer 720a4adc91
system: Modify GDB skeleton to find debug files for any profile.
Instead of hard coding the debug directory to that of the user profile, use
Guile scripting in combination with a new search path specification on GDB to
specify the debug file directories.

* gnu/packages/gdb.scm (gdb-9.1): Add a search path specification for the
GDB_DEBUG_FILE_DIRECTORY environment variable.
* gnu/system/shadow.scm (default-skeletons)[gdbinit]: Derive the value of
DEBUG-FILE-DIRECTORY via the GDB_DEBUG_FILE_DIRECTORY environment variable.
* doc/guix.texi (Installing Debugging Files): Document it.
2020-08-16 15:26:26 -04:00
Ludovic Courtès dd0804c67e
services: Add descriptions.
* gnu/services/dbus.scm (polkit-service-type)[description]: New field.
* gnu/services/dict.scm (dicod-service-type)[description]: New field.
* gnu/services/dns.scm (knot-service-type)[description]: New field.
* gnu/services/networking.scm (dhcpd-service-type)[description]: New field.
* gnu/services/shepherd.scm (shepherd-root-service-type)[description]:
New field.
* gnu/services/xorg.scm (slim-service-type)[description]: New field.
(screen-locker-service-type)[description]: New field.
* gnu/system/pam.scm (pam-root-service-type)[description]: New field.
* gnu/system/shadow.scm (account-service-type)[description]: New field.
2020-05-08 16:30:50 +02:00
Ludovic Courtès 1e7281108b
services: account: Have 'user-processes' depend on 'user-homes'.
Until now, 'user-homes' happened to start right after 'user-processes'
and before services that depend on a home directory but the dependency
was not explicit.  This addresses it.

* gnu/system/shadow.scm (account-service-type): Extend
USER-PROCESSES-SERVICE-TYPE.
2020-04-17 23:18:32 +02:00
Efraim Flashner f12bd0bedd
system: Move nanorc to XDG_CONFIG_HOME.
* gnu/system/shadow.scm (skeleton-directory): Move .nanorc to
.config/nano/nanorc.
2020-04-01 07:50:48 +03:00
Leo Famulari 49d20d51e9
Revert "system: Move nanorc to XDG_CONFIG_HOME."
This reverts commit bd71818df3.

This changed caused system reconfiguration to fail like this:

------
building /gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv...
Backtrace:
           4 (primitive-load "/gnu/store/2x7d0jsbgf2ndb5fsk0nj07rhsx?")
In ice-9/eval.scm:
    619:8  3 (_ #f)
In ice-9/boot-9.scm:
   260:13  2 (for-each #<procedure 7ffff6ad8100 at ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
   343:27  1 (_ "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc" ?)
In unknown file:
           0 (copy-file "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrs?" ?)

ERROR: In procedure copy-file:
In procedure copy-file: No such file or directory
`/gnu/store/v1grsca743phw41lyf63dzmh9nz5jlpn-bash_profile' -> `.bash_profile'
`/gnu/store/xdsaw0mj6axj427hyi6ysrnsxi21n7d5-bashrc' -> `.bashrc'
`/gnu/store/6i0b236dyar78zc5k5hrj5dv3vr4zb9w-zprofile' -> `.zprofile'
`/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc' -> `.config/nano/nanorc'
builder for `/gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv' failed with exit code 1
------
2020-03-30 16:02:38 -04:00
Efraim Flashner bd71818df3
system: Move nanorc to XDG_CONFIG_HOME.
* gnu/system/shadow.scm (default-skeletons): Move .nanorc to
.config/nano/nanorc.
2020-03-30 15:40:30 +03:00
Jan Nieuwenhuizen ac75bd0102
gnu: system: Remove guile-wm from skeleton.
* gnu/system/shadow.scm (default-skeletons): Remove guile-wm (especially as a
dependency).
2020-03-19 12:14:19 +01:00
Ludovic Courtès 051b279fd0
services: account: Make 'user-homes' a one-shot service.
* gnu/system/shadow.scm (account-shepherd-service): Add 'one-shot?'
field.  Return #t from 'start'.
2019-04-23 16:38:12 +02:00
Ludovic Courtès 0ae735bcc8
activation: Build account databases with (gnu build accounts).
* gnu/build/activation.scm (enumerate, current-users, current-groups)
(add-group, add-user, modify-user, ensure-user): Remove.
(activate-users+groups)[touch, activate-user]: Remove.
[make-home-directory]: New procedure.
Rewrite in terms of 'user+group-databases', 'write-group', etc.
* gnu/build/install.scm (directives): Remove "/root".
* gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...)
expression, which is now unneeded.
2019-03-07 20:05:09 +01:00
Ludovic Courtès 6061d01512
activation: Operate on <user-account> and <user-group> records.
* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New
procedures.
* gnu/system/shadow.scm (account-activation): Call them in the arguments
to 'activate-users+groups'.
(account-shepherd-service): Likewise.
* gnu/build/activation.scm (activate-users+groups): Expect a list of
<user-account> and a list of <user-group>.  Replace uses of 'match' on
tuples with calls to record accessors.
(activate-user-home): Likewise.
2019-03-07 20:05:09 +01:00
Ludovic Courtès f6f67b87c0
system: Add (gnu system accounts).
The (gnu system accounts) module is meant to be used both on the build-
and on the host-side.

* gnu/system/shadow.scm <top level>: Call 'default-shell'.
(<user-account>, <user-group>): Move to...
* gnu/system/accounts.scm: ... here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add system/accounts.scm.
2019-03-07 20:04:02 +01:00
Chris Marusich 2f4d43584c
system: Rename .zlogin to .zprofile.
Reported by Meiyo Peng <meiyo.peng@gmail.com>.

* gnu/system/shadow.scm (default-skeletons): Rename zlogin to zprofile.
2018-10-19 00:45:20 -07:00
Ludovic Courtès 10df28d74d
system: '.guile' skeleton now recommends 'guile-colorized'.
* gnu/system/shadow.scm (default-skeletons)[".guile"]: Recommend
'guile-colorized'.
2018-07-23 12:25:31 +02:00
Tobias Geerinckx-Rice 142869f80f
Don't force colour in aliases.
* gnu/system/shadow.scm (default-skeletons): Substitute ‘--color=auto’
for ‘--color’ (which implies ‘=always’) in aliases.
* doc/guix.texi (G-Expressions): Also adjust examples as that makes
more sense.
2018-07-05 02:35:03 +02:00
Ludovic Courtès b19950a184
system: Default .bashrc now sources /etc/bashrc.
This is a followup to commit 1382bde93c,
which disabled automatic sourcing of /etc/bashrc by interactive shell.
The noticeable effect of the change would be that Bash completion would
only work in login shells.

* gnu/system/shadow.scm (default-skeletons)["bashrc"]: Source
/etc/bashrc.
2018-06-11 18:23:24 +02:00
Ludovic Courtès 76a77ccaed
system: Add default '.nanorc' with syntax highlighting.
* gnu/system/shadow.scm (default-skeletons): Add ".nanorc".
2018-04-04 23:14:35 +02:00
Leo Famulari 4adb40bffc
Merge branch 'master' into core-updates 2018-01-11 14:22:50 -08:00
Ludovic Courtès b0de7fdba6
system: Extend .gdbinit to authorize extensions from /gnu/store/*/lib.
* gnu/system/shadow.scm (default-skeletons)["gdbinit"]: Add 'auto-load
safe-path' statement.
2018-01-09 23:39:02 +01:00
Ludovic Courtès 2ba2c98d8a
gnu: guile: Move Readline support to a separate 'guile-readline' package.
This reduces the closure of Guile from 131 MiB to 116 MiB and removes
extra readline/ncurses builds from the bootstrap path.

* gnu/packages/guile.scm (guile-2.0)[inputs]: Remove READLINE.
(make-guile-readline): New procedure.
(guile-readline): New variable.
* gnu/system/shadow.scm (default-skeletons): Adjust '.guile' so that it
gracefully deals with missing (ice-9 readline).
2017-12-08 18:18:59 +01:00
Marius Bakke 2c16be569c
system: Return early in skeleton '.bashrc' when the shell is non-interactive.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Add return statement.
2017-11-01 20:29:32 +01:00
Marius Bakke 0ab59dd8b8
system: Test for interactive shell instead of cat in skeleton '.bashrc'.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Wrap $SSH_CLIENT test in
a conditional testing for interactive shell.
2017-11-01 20:29:32 +01:00
Ludovic Courtès 138fe41198
system: Add 'grep --color' alias in '.bash_profile' skeleton.
* gnu/system/shadow.scm (default-skeletons)[profile]: Add 'grep' alias.
2017-07-27 14:44:28 +02:00
Ludovic Courtès a84ea2191e
system: Add a default '.guile' skeleton.
* gnu/system/shadow.scm (default-skeletons): Add ".guile".
2017-07-25 12:23:26 +02:00
Ludovic Courtès 4ddb64f57d
system: Refer to native packages when appropriate.
* gnu/system/locale.scm (localedef-command): Use the native LIBC.
* gnu/system/shadow.scm (default-skeletons): Use the native GUILE-WM.
2017-07-11 22:47:08 +02:00
Ludovic Courtès 69daee23af
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance.  See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.

* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'.  Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 16:16:17 +02:00
Ludovic Courtès 357db1f91d
system: More 'file-append' instead of #~(string-append #$thing …).
* gnu/system/shadow.scm (<user-account>)[shell]: Use 'file-append'.
(%base-user-accounts): Likewise.
* gnu/system/grub.scm (%background-image): Likewise.
2017-02-01 12:36:41 +01:00
Ludovic Courtès ae763b5b0b
system: Create home directories once 'file-systems' is up.
Fixes <http://bugs.gnu.org/21108>.
Reported by Andy Patterson <ajpatter@uwaterloo.ca>
and Leo Famulari <leo@famulari.name>.

* gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass
  #:create-home? #t iff CREATE-HOME? and SYSTEM?.
(activate-user-home): New procedure.
* gnu/system/shadow.scm (account-shepherd-service): New procedure.
(account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE
extension.
* gnu/tests/base.scm (run-basic-test)["home"]
["skeletons in home directories"]: New tests.
* gnu/tests/install.scm (%separate-home-os, %separate-home-os-source)
(%test-separate-home-os): New variables.
2017-02-01 12:36:41 +01:00
Ludovic Courtès d03db7434b
system: Do not create the home directory of "nobody".
Fixes <http://bugs.gnu.org/24275>.
Reported by John Darrington <john@darrington.wattle.id.au>.

* gnu/system/shadow.scm (%base-user-accounts):
Add (create-home-directory? #f) for "nobody".
2016-08-28 15:11:18 +02:00
Ludovic Courtès eb56ee027b
system: Add 'create-home-directory?' field to <user-account>.
* gnu/system/shadow.scm (<user-account>)[create-home-directory?]: New
field.
(user-account->gexp): Serialize it.
* gnu/build/activation.scm (activate-users+groups)[activate-user]:
Update 'match-lambda' pattern accordingly.  Pass #:create-home? to
'ensure-user'.
(add-user, modify-user, ensure-user): Add #:create-home? parameter and
honor it.
* doc/guix.texi (User Accounts): Document it.
2016-08-28 15:11:18 +02:00
Ludovic Courtès 7575655212
Merge branch 'master' into core-updates 2016-07-20 11:42:17 +02:00
Ludovic Courtès 2d94702ff4
system: Change the shell of 'nobody' to 'nologin'.
Fixes <http://bugs.gnu.org/23971>.
Reported by Vincent Legoll <vincent.legoll@gmail.com>.

* gnu/system/shadow.scm (%base-user-accounts): Add 'shell' field.  Set
'home-directory' to "/nonexistent".
2016-07-13 23:42:35 +02:00
Ludovic Courtès 4ee96a7912
gnu: Switch to 'with-imported-modules'.
* gnu/services.scm (directory-union): Use 'with-imported-modules'
instead of the '#:modules' argument of 'computed-file'.
* gnu/services/base.scm (udev-rules-union): Likewise.
* gnu/services/dbus.scm (system-service-directory): Likewise.
* gnu/services/desktop.scm (wrapped-dbus-service):
(polkit-directory): Likewise.
* gnu/services/networking.scm (tor-configuration->torrc): Likewise.
* gnu/services/xorg.scm (xorg-configuration-directory): Likewise.
* gnu/system/install.scm (self-contained-tarball): Likewise.
* gnu/system/linux-container.scm (container-script): Likewise.
* gnu/system/linux-initrd.scm (expression->initrd): Likewise, and
remove #:modules parameter.
(flat-linux-module-directory): Use 'with-imported-modules'.
(base-initrd): Likewise.
* gnu/system/locale.scm (locale-directory): Likewise.
* gnu/system/shadow.scm (default-skeletons): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
* gnu/tests/base.scm (run-basic-test): Likewise.
* gnu/tests/install.scm (run-install): Likewise.
* doc/guix.texi (Initial RAM Disk): Update 'expression->initrd'
documentation.
2016-07-12 22:47:08 +02:00
Leo Famulari eb74eb4199
Merge branch 'master' into core-updates 2016-05-13 02:08:11 -04:00
Alex Griffin ba2613bb4e
system: Do not export PS1 in /etc/skel/.bashrc.
* gnu/system/shadow.scm (default-skeletons)[bashrc]: Remove "export"
for 'PS1'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-05-06 13:25:30 +02:00
Alex Kost f8835ff4b3 gnu: fontconfig: Find fonts in the system profile.
Fixes <http://bugs.gnu.org/22927>.
Reported by myglc2 <myglc2@gmail.com>.

This also reverts commit e71ef7adae.

* gnu/packages/fontutils.scm (fontconfig)[arguments]: Add
/run/current-system/profile/share/fonts to --with-add-fonts configure flag.
* gnu/system/shadow.scm (default-skeletons): Do not create "fonts.conf" file.
2016-04-03 10:37:44 +03:00
Ludovic Courtès e71ef7adae system: Make sure fonts are searched for in the system profile.
This fixes a bug whereby fonts in /run/current-system/profile would be
invisible to Fontconfig.

* gnu/packages/fontutils.scm (fontconfig): Add comment about system
profile not being searched.
* gnu/system/shadow.scm (default-skeletons)[fonts.conf-content,
fonts.conf]: New variable.
Add FONTS.CONF to the skeletons.
2016-03-20 15:27:44 +01:00
Ludovic Courtès 4e8b7502e3 system: Allow account skeletons to be directories.
* gnu/system/shadow.scm (skeleton-directory): Use 'copy-recursively'
instead of 'copy-file'.
* gnu/build/activation.scm (copy-account-skeletons): Likewise.
2016-03-20 15:02:38 +01:00
Ludovic Courtès 21059b26b0 system: Populate /etc/shells from ACCOUNT-SERVICE-TYPE.
* gnu/system.scm (user-shells): Remove.
  (operating-system-etc-service): Remove "shells" entry.
  (shells-file): Move to...
* gnu/system/shadow.scm (shells-file): ... here.  New procedure.
  (etc-skel): Rename to...
  (etc-files): ... this.  Add "shells" entry.
  (account-service-type): Adjust accordingly.
2015-11-11 00:37:50 +01:00
Ludovic Courtès 0adfe95a3e services: Introduce extensible services.
This patch rewrites GuixSD services to make them extensible.

* gnu-system.am (GNU_SYSTEM_MODULES): Add gnu/services/dbus.scm.
* gnu/services.scm (<service>): Replace with new record type.
  (<service-extension>, <service-type>): New record types.
  (write-service-type, compute-boot-script, second-argument): New
  procedures.
  (%boot-service, boot-service-type): New variables.
  (file-union, directory-union, modprobe-wrapper,
  activation-service->script, activation-script,
  gexps->activation-gexp): New procedures.
  (activation-service-type, %activation-service): New variables.
  (etc-directory, files->etc-directory, etc-service): New procedures.
  (etc-service-type, setuid-program-service, firmware-service-type): New
  variables.
  (firmware->activation-gexp): New procedure.
  (&service-error, &missing-target-service-error,
  &ambiguous-target-service-error): New condition types.
  (service-back-edges, fold-services): New procedures.
* gnu/services/avahi.scm (<avahi-configuration>): New record type.
  (configuration-file): Replace keyword parameters with a single
  'config' parameter.
  (%avahi-accounts, %avahi-activation, avahi-service-type): New
  variables.
  (avahi-dmd-service): New procedure.
  (avahi-service): Rewrite using 'service' and 'avahi-configuration'.
* gnu/services/base.scm (%root-file-system-dmd-service,
  root-file-system-service-type): New variables.
  (root-file-system-service): Use them.
  (file-system->dmd-service-name): New procedure.
  (file-system-service-type): New variable.
  (file-system-service): Use it.  Replace keyword parameters with a
  single 'file-system' object.
  (user-unmount-service-type): New variable.
  (user-unmount-service): Use it.
  (user-processes-service-type): New variable.
  (user-processes-service): Use it.
  (host-name-service-type): New variable.
  (host-name-service): Use it.
  (console-keymap-service-type): New variable.
  (console-keymap-service): Use it.
  (console-font-service-type): New variable.
  (console-font-service): Use it.
  (mingetty-pam-service, mingetty-dmd-service): New procedures.
  (mingetty-service-type): New variable.
  (mingetty-service): Use it.
  (nscd-dmd-service): New procedure.
  (nscd-activation, nscd-service-type): New variables.
  (nscd-service): Use the latter.
  (syslog-service-type): New variable.
  (syslog-service): Use it.
  (<guix-configuration>): New record type.
  (%default-guix-configuration): New variable.
  (guix-dmd-service, guix-accounts, guix-activation): New procedures.
  (guix-service-type): New variable.
  (guix-service): Replace list of keyword parameters with a single
  'config' parameter.  Rewrite using 'service'.
  (<udev-configuration>): New record type.
  (udev-dmd-service): New procedure.
  (udev-service-type): New variable.
  (udev-service): Use it.
  (device-mapping-service-type): New variable.
  (device-mapping-service): Use it.
  (swap-service-type): New variable.
  (swap-service): Use it.
* gnu/services/databases.scm (<postgresql-configuration>): New record
  type.
  (%postgresql-accounts, postgresql-activation): New variables.
  (postgresql-dmd-service): New procedure.
  (postgresql-service): Rewrite using 'service' and
  'postgresql-configuration'.
* gnu/services/dbus.scm: New file.
* gnu/services/desktop.scm (dbus-configuration-directory, dbus-service):
  Remove.
  (wrapped-dbus-service): New procedure.
  (<upower-configuration>): New record type.
  (upower-configuration-file): Replace keyword parameters with single
  <upower-configuration> parameter.
  (%upower-accounts, %upower-activation): New variables.
  (upower-dbus-service, upower-dmd-service): New procedures.
  (upower-service-type): New variable.
  (upower-service): Rewrite using 'service' and 'upower-configuration'.
  (%colord-activation, %colord-accounts): New variables.
  (colord-dmd-service): New procedure.
  (colord-service-type): New variable.
  (colord-service): Rewrite using 'service'.
  (<geoclue-configuration>): New record type.
  (geoclue-configuration-file): Replace keyword parameters with a single
  'config' parameter.
  (geoclue-dbus-service, geoclue-dmd-service): New procedures.
  (%geoclue-accounts, geoclue-service-type): New variables.
  (geoclue-service): Rewrite using 'service' and
  'geoclue-configuration'.
  (%polkit-accounts, %polkit-pam-services, polkit-service-type): New
  variables.
  (polkit-dmd-service): New procedure.
  (polkit-service): Rewrite using 'service'.
  (<elogind-configuration>)[elogind]: New field.
  (elogind-dmd-service): New procedure.
  (elogind-service-type): New variable.
  (elogind-service): Rewrite using 'service'.
  (%desktop-services): Remove argument to 'dbus-service'.  Remove 'map'
  over %BASE-SERVICES.
* gnu/services/dmd.scm (dmd-boot-gexp): New procedure.
  (dmd-root-service-type, %dmd-root-service): New variables.
  (dmd-service-type): New macro.
  (<dmd-service>): New record type.
* gnu/services/lirc.scm (<lirc-configuration>): New record type.
  (%lirc-activation): New variable.
  (lirc-dmd-service): New procedure.
  (lirc-service-type): New variable.
  (lirc-service): Rewrite using 'service' and 'lirc-configuration'.
* gnu/services/networking.scm (<static-networking>): New record type.
  (static-networking-service-type): New variable.
  (static-networking-service): Rewrite using 'service' and
  'static-networking'.
  (dhcp-client-service-type): New variable.
  (dhcp-client-service): Rewrite using 'service'.
  (<ntp-configuration>): New record type.
  (ntp-dmd-service): New procedure.
  (ntp-service-type): New variable.
  (ntp-service): New procedure.
  (%tor-accounts, tor-service-type): New variable.
  (tor-dmd-service): New procedure.
  (tor-service): Rewrite using 'service'.
  (<bitlbee-configuration>): New record type.
  (bitlbee-dmd-service): New procedure.
  (%bitlbee-accounts, %bitlbee-activation, bitlbee-service-type): New
  variables.
  (bitlbee-service): Rewrite using 'service'.
  (%wicd-activation): New variable.
  (wicd-dmd-service): New procedure.
  (wicd-service-type): New variable.
  (wicd-service): Rewrite using 'service'.
* gnu/services/ssh.scm (<lsh-configuration>): New record type.
  (activation): Rename to...
  (lsh-initialization): ... this.
  (lsh-activation, lsh-dmd-service, lsh-pam-services): New procedures.
  (lsh-service-type): New variable.
  (lsh-service): Rewrite using 'service' and 'lsh-configuration'.
* gnu/services/web.scm (<nginx-configuration>): New record type.
  (%nginx-accounts): New variable.
  (nginx-activation, nginx-dmd-service): New procedures.
  (nginx-service-type): New variable.
  (nginx-service): Rewrite using 'service' and 'nginx-configuration'.
* gnu/services/xorg.scm (<slim-configuration>): New record type.
  (slim-pam-service, slim-dmd-service): New procedures.
  (slim-service-type): New variable.
  (slim-service): Rewrite using 'service' and 'slim-configuration'.
* gnu/system.scm (file-union): Remove.
  (other-file-system-services): Adjust to new 'file-system-service'
  signature.
  (essential-services): Add #:container? parameter.  Add
  %DMD-ROOT-SERVICE, %ACTIVATION-SERVICE, and calls to
  'pam-root-service', 'account-service', 'operating-system-etc-service',
  and a SETUID-PROGRAM-SERVICE instance.
  (operating-system-services): Pass #:container? to 'essential-services.
  (etc-directory): Remove.
  (operating-system-etc-service): New procedure.  Rewrite as a call to
  'etc-service'.
  (operating-system-accounts): Change to not return accounts required by
  services.
  (operating-system-etc-directory): Rewrite as a call to 'fold-services'
  and 'etc-directory'.
  (user-group->gexp, user-account->gexp, modprobe-wrapper): Remove.
  (operating-system-activation-script): Rewrite as a call to
  'fold-services' and 'activation-service->script'.
  (operating-system-boot-script): Likewise.
  (operating-system-derivation): Add call to 'lower-object'.
  (emacs-site-file, emacs-site-directory, shells-file): Change to use
  'computed-file' and 'scheme-file' instead of the monadic procedures.
* gnu/system/install.scm (cow-store-service-type): New variable.
  (cow-store-service): Rewrite using 'service'.
  (/etc/configuration-files): New procedure.
  (configuration-template-service-type,
  %configuration-template-service): New variables.
  (configuration-template-service): Remove.
  (installation-services): Adjust accordingly.  Adjust argument to
  'guix-service'.
* gnu/system/linux.scm (/etc-entry, pam-root-service): New procedures.
  (pam-root-service-type): New variable.
* gnu/system/shadow.scm (user-group->gexp, user-account->gexp,
  account-activation, etc-skel, account-service): New procedures.
  (account-service-type): New variable.
* tests/services.scm: New file.
* doc/guix.texi (Base Services, Desktop Services): Adjust accordingly.
  (Defining Services): Rewrite.
* doc/images/service-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
* po/guix/POTFILES.in: Add gnu/services.scm.
2015-10-10 22:55:15 +02:00