Commit Graph

259 Commits

Author SHA1 Message Date
Ludovic Courtès
f453f637d5 system: Allow the root file system to be named by UUID.
* gnu/build/file-systems.scm (canonicalize-device-spec)[canonical-title]:
Use 'string->uuid' to check whether SPEC is a UUID.
When SPEC is a string and CANONICAL-TITLE is 'uuid, call 'string->uuid'.
* gnu/system.scm (operating-system-grub.cfg): Add 'root-device'
variable and use it for the "--root=" argument.
2016-01-01 22:50:26 +01:00
Ludovic Courtès
29824d80ec system: Allow the root file system to have a UUID.
This is a followup to ab64483.

* gnu/system.scm (mapped-device-user): Check whether the title of FS is
'device before calling 'string=?'.
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Likewise.
2016-01-01 22:34:13 +01:00
Ludovic Courtès
ab64483f64 file-systems: The 'device' field can be a UUID (bytevector).
Previously a wrong-type-arg error would be raised when a file system
with a UUID (bytevector) field was encountered.

* gnu/system.scm (other-file-system-services)[device-mappings]: Check
whether FS's device is a string.
2015-12-22 00:29:43 +01:00
Ludovic Courtès
e43e84ba7a services: Add 'fstab-service-type'.
* gnu/services/base.scm (file-system->fstab-entry)
(file-systems->fstab): New procedures.
(fstab-service-type): New variable.
* gnu/services/base.scm (file-system-dmd-service): New procedure, taken
from...
(file-system-service-type): ... here.
* gnu/system.scm (essential-services): Add FSTAB-SERVICE-TYPE instance.
2015-12-22 00:04:36 +01:00
宋文武
6bad7524a6 system: Add /etc/environment.
* gnu/system.scm: (operating-system-environment-variables): New procedure.
Adapted and moved environment variables from /etc/profile.
(operating-system-etc-service): Adjust accordingly.
(essential-services): Add an instance of SESSION-ENVIRONMENT-SERVICE-TYPE.
2015-12-05 10:51:49 +08: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
6e82863463 system: Rename (gnu system linux) to (gnu system pam).
* gnu/system/linux.scm: Rename to...
* gnu/system/pam.scm: ... this.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu.scm, gnu/services/base.scm, gnu/services/desktop.scm,
  gnu/services/networking.scm, gnu/services/ssh.scm,
  gnu/services/xorg.scm, gnu/system.scm, gnu/system/vm.scm: Likewise.
2015-11-03 18:11:45 +01:00
Ludovic Courtès
af4c3fd5e3 services: Add 'profile-service-type'.
* gnu/services.scm (packages->profile-entry): New procedure.
  (profile-service-type): New variable.
* gnu/system.scm (operating-system-directory-base-entries): Remove
  the "profile" entry.
  (essential-services): Add a PROFILE-SERVICE-TYPE instance.
  (operating-system-profile): Rewrite in terms of 'fold-services'.
* doc/guix.texi (Service Reference): Add 'profile-service-type'.
* doc/images/service-graph.dot: Likewise.
2015-11-02 22:25:12 +01:00
Ludovic Courtès
d62e201cfd services: Add 'system-service-type'.
* gnu/services.scm (system-derivation): New procedure.
  (system-service-type): New variable.
  (boot-script-entry): New procedure.
  (boot-service-type): Extend SYSTEM-SERVICE-TYPE.
  (etc-entry): New procedure.
  (etc-service-type): Extend SYSTEM-SERVICE-TYPE.
  (fold-services): Change default #:target-type to SYSTEM-SERVICE-TYPE.
* gnu/system.scm (operating-system-directory-base-entries): New procedure.
  (essential-services): Use it.  Add an instance of
  SYSTEM-SERVICE-TYPE.
  (operating-system-boot-script): Pass #:target-type to 'fold-services'.
  (operating-system-derivation): Rewrite in terms of 'fold-services'.
* gnu/system/linux-container.scm (system-container): Remove.
  (container-script): Use 'operating-system-derivation'.
* guix/scripts/system.scm (export-extension-graph): Replace
  BOOT-SERVICE-TYPE by SYSTEM-SERVICE-TYPE.
* doc/images/service-graph.dot: Add 'system' node and edges.
* doc/guix.texi (Service Composition): Mention SYSTEM-SERVICE-TYPE.
  (Service Reference): Document it.  Update 'fold-services'
  documentation.
2015-11-02 22:25:11 +01:00
Ludovic Courtès
34760ae703 system: Add 'locale-libcs' field.
* gnu/system/locale.scm (localedef-command)[maybe-version-directory]:
  New procedure.
  Use it.
  (locale-directory): Rename to...
  (single-locale-directory): ... this.  Check the version of LIBC to
  determine whether to create a "X.Y" sub-directory or to make it a
  symlink to ".".  Add the version number in the derivation name.
  (locale-directory): New procedure.
  (%default-locale-libcs): New variable.
* gnu/system.scm (<operating-system>)[locale-libcs]: New field.
  (operating-system-locale-directory): Pass it to 'locale-directory'.
* doc/guix.texi (operating-system Reference): Document 'locale-libcs'.
  (Locales)[Locale Data Compatibility Considerations]: New section.
2015-10-30 23:05:52 +01:00
Ludovic Courtès
a241a7ac65 services: Add 'linux-bare-metal-service-type'.
* gnu/services.scm (modprobe-wrapper): Remove.
  (activation-script): Do not use it.  Remove calls to
  'activate-modprobe' and 'activate-ptrace-attach' in gexp.
  (%modprobe-wrapper, %linux-kernel-activation,
  linux-bare-metal-service-type, %linux-bare-metal-service): New
  variables.
* gnu/system.scm (essential-services): Add %LINUX-BARE-METAL-SERVICE to
  the list, unless CONTAINER? is true.
2015-10-29 23:03:08 +01:00
Ludovic Courtès
e502bf8953 system: File systems depend on their corresponding device mappings.
Fixes a regression introduced in commit 0adfe95.

* gnu/system.scm (other-file-system-services)[requirements]: Remove.
  [add-dependencies]: New procedure.
  Use it.
* gnu/system/file-systems.scm (<file-system>)[dependencies]: Update
  comment.
* gnu/services/base.scm (mapped-device->dmd-service-name,
  dependency->dmd-service-name): New procedures.
  (file-system-service-type): Use it.
2015-10-29 19:07:58 +01:00
Ludovic Courtès
4af7c83bc7 system: Define 'GST_PLUGIN_PATH' in /etc/profile.
* gnu/system.scm (operating-system-etc-service)[profile]: Add
  'GST_PLUGIN_PATH' definition.
2015-10-15 23:11:29 +02: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
Ludovic Courtès
e79467f63a system: Account skeleton API is non-monadic.
* gnu/system/shadow.scm (default-skeletons): Use the non-monadic
  procedures and turn into a regular procedure.
  (skeleton-directory): Likewise.
* gnu/system.scm (etc-directory): Adjust accordingly.
2015-10-10 22:46:15 +02:00
Ludovic Courtès
23afe939a2 system: pam: Use 'computed-file' instead of 'gexp->derivation'.
* gnu/system/linux.scm (pam-service->configuration): Use 'computed-file'
  instead of 'gexp->derivation'.
  (pam-services->directory): Likewise.
* gnu/system.scm (etc-directory): Adjust accordingly.
2015-10-10 22:46:15 +02:00
Ludovic Courtès
be1c2c54d9 system: Make service procedures non-monadic.
* gnu/services/avahi.scm (configuration-file): Use 'plain-file' instead
  of 'text-file'.
  (avahi-service): Turn into a regular procedure that returns a <service>.
* gnu/services/base.scm (root-file-system-service, file-system-service,
  user-unmount-service, user-processes-service, host-name-service,
  console-keymap-service, console-font-service, mingetty-service,
  nscd.conf-file, nscd-service): Likewise.
  (%default-syslog.conf): New variable.
  (syslog-service): Use it.  Turn into a regular procedure.
  (guix-service, udev-rules-union, kvm-udev-rule, udev-service,
  device-mapping-service, swap-service): Likewise.
* gnu/services/databases.scm (%default-postgres-hba,
  %default-postgres-ident): Use 'plain-file' instead of 'text-file'.
  (%default-postgres-config): Use 'mixed-text-file' instead of
  'text-file*'.
  (postgresql-service):  Use 'program-file' instead of 'gexp->script'.
  Turn into a regular procedure.
* gnu/services/desktop.scm (dbus-configuration-directory): Use
  'computed-file' instead of 'gexp->derivation'.
  (upower-configuration-file, geoclue-configuration-file,
  elogind-configuration-file): Use 'plain-file' instead of 'text-file'.
  (dbus-service, upower-service, colord-service, geoclue-service,
  polkit-service, elogind-service): Turn into regular procedures.
  (%desktop-services): Remove use of 'mlet' when iterating on
  %BASE-SERVICES.
* gnu/services/lirc.scm (lirc-service): Turn into a regular procedure.
* gnu/services/networking.scm (static-networking-service,
  dhcp-client-service, ntp-service, tor-service, bitlbee-service,
  wicd-service): Likewise.
* gnu/services/ssh.scm (lsh-service): Likewise.
* gnu/services/web.scm (nginx-service): Likewise.
* gnu/services/xorg.scm (xorg-configuration-file): Use 'mixed-text-file'
  instead of 'text-file*'.
  (xorg-start-command, slim-service): Turn into regular procedures.
  (xinitrc): Use 'program-file' instead of 'gexp->script'.
* gnu/system/install.scm (cow-store-service,
  configuration-template-service): Turn into regular procedures.
* gnu/system.scm (other-file-system-services, device-mapping-services,
  swap-services, essential-services, operating-system-services,
  user-shells, operating-system-accounts): Remove now unnecessary
  'mlet' and turn into regular procedures.
  (operating-system-etc-directory, operating-system-activation-script,
  operating-system-boot-script): Adjust accordingly.
* doc/guix.texi (Base Services, Networking Services, X Window, Desktop
  Services, Database Services, Web Services, Various Services, Name
  Service Switch): Adjust accordingly.
2015-10-10 22:46:14 +02:00
David Thompson
239db054a7 gnu: system: Add Linux container module.
* gnu/system/linux-container.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system.scm: Export 'operating-system-etc-directory',
  'operating-system-boot-script', 'operating-system-locale-directory', and
  'file-union'.
  (operating-system-boot-script): Add #:container? keyword argument.
  (operating-system-activation-script): Add #:container?  keyword argument.
  Don't call 'activate-firmware' or 'activate-ptrace-attach' when activating a
  container.
2015-09-14 08:30:46 -04:00
Mark H Weaver
3b65abacff Revert "PRELIMINARY: Add three programs to %setuid-programs."
This reverts commit fb1e06fc5f.
2015-08-18 23:56:16 -04:00
Mark H Weaver
fb1e06fc5f PRELIMINARY: Add three programs to %setuid-programs. 2015-08-18 23:52:57 -04:00
Mark H Weaver
57082417f3 system: Default to newest linux-libre.
* gnu/system.scm (<operating-system>)[kernel]: Change default to
  LINUX-LIBRE.
2015-08-04 11:58:26 -04:00
Ludovic Courtès
5b9da1f955 system: Add 'ping6' to %SETUID-PROGRAMS.
* gnu/system.scm (%setuid-programs): Add 'ping6'.
2015-07-26 00:57:44 +02:00
Ludovic Courtès
dcd9c2505c system: Default to Linux-libre 4.0.
* gnu/system.scm (<operating-system>)[kernel]: Change default to
  LINUX-LIBRE-4.0.
2015-07-20 00:55:13 +02:00
Ludovic Courtès
e51710d1ef file-systems: Add a 'dependencies' field to <file-system>.
* gnu/system/file-systems.scm (<file-system>)[dependencies]: New field.
* gnu/system.scm (other-file-system-services)[requirements]: Honor
  'file-system-dependencies'.
* doc/guix.texi (File Systems): Document it.
2015-07-17 19:24:15 +02:00
Ludovic Courtès
ee2a6304f3 system: Add 'kernel-arguments' field.
* gnu/system.scm (<operating-system>)[kernel-arguments]: New field.
  (operating-system-grub.cfg): Honor it.
  (operating-system-parameters-file): Add 'kernel-arguments' to the parameters
  file.
* guix/scripts/system.scm (previous-grub-entries)[system->grub-entry]: Read
  the 'kernel-arguments' field of the parameters file, when available.
* gnu/system/vm.scm (system-qemu-image/shared-store-script):
  Use (operating-system-kernel-arguments os) in '-append'.
* doc/guix.texi (operating-system Reference): Document it.
2015-07-17 01:11:06 +02:00
David Thompson
85c3127fa9 build: file-systems: Import (guix build syscalls) for non-static Guiles.
* gnu/build/file-systems.scm: Import (guix build syscalls) when 'mount' is not
  defined.
* gnu/system.scm (operating-system-activation-script): Include (guix build
  syscalls) module in derivation.
2015-07-09 08:23:03 -04:00
Alex Kost
c05c43216f system: Fix typo.
* gnu/system.scm (etc-directory): Fix typo in a comment.
2015-07-07 21:28:53 +03:00
宋文武
49dc60f836 system: emacs-site-file: Use 'geiser-install to load geiser.
Suggested by Alex Kost <alezost@gmail.com>.

* gnu/system.scm (emacs-site-file): Use 'geiser-install to load geiser
  instead of setting 'geiser-guile-load-path' manually.
2015-06-23 13:09:50 +08:00
Alex Kost
f5a9ffa006 system: Rename 'sudoers' into 'sudoers-file'.
* gnu/system.scm (<operating-system>): Rename record field.
  (etc-directory): Rename argument.
  (operating-system-etc-directory): Adjust accordingly.
* doc/guix.texi (operating-system Reference): Likewise.
2015-06-16 21:24:13 +03:00
Ludovic Courtès
24e02c28fb system: 'hosts-file' is now a file-like object.
Partly fixes <http://bugs.gnu.org/20720>.
Reported by Alex Kost <alezost@gmail.com>.

* gnu/system.scm (default-/etc/hosts): Change 'text-file' to 'plain-file'.
  (maybe-file->monadic): New procedure.
  (operating-system-etc-directory): Use it.
* doc/guix.texi (operating-system Reference, Networking Services): Adjust
  accordingly.
2015-06-05 22:41:55 +02:00
Ludovic Courtès
847658395e system: 'sudoers' is now a file-like object.
Partly fixes <http://bugs.gnu.org/20720>
Reported by Alex Kost <alezost@gmail.com>.

* gnu/system.scm (etc-directory): Change default #:sudoers value to a
  'plain-file'.  Don't bind it.  Remove #~#$.
  (maybe-string->file): New procedure.
  (operating-system-etc-directory): Use it.
  (%sudoers-specification): Use 'plain-file'.
* doc/guix.texi (operating-system Reference): Adjust accordingly.
2015-06-05 20:22:47 +02:00
Ludovic Courtès
bf87f38ace system: Define '%base-user-accounts'.
* gnu/system/shadow.scm (%base-user-accounts): New variable.
* gnu/system.scm (<operating-system>)[users]: Use it as the default value.
* gnu/system/examples/bare-bones.tmpl (users): Use it.
* gnu/system/examples/desktop.tmpl (users): Likewise.
* doc/guix.texi (operating-system Reference, User Accounts): Adjust
  accordingly.
2015-05-25 21:34:23 +02:00
Ludovic Courtès
0c09a306e5 system: Make sure user accounts refer to existing groups.
Fixes <http://bugs.gnu.org/20646>.
Reported by David Thompson <davet@gnu.org>.

* gnu/system/shadow.scm (assert-valid-users/groups): New procedure
* gnu/system.scm (operating-system-activation-script): Use it.
* tests/guix-system.sh (make_user_config): New function.
  Add 3 tests using it.
* po/guix/POTFILES.in: Add gnu/system/shadow.scm.
2015-05-24 18:02:54 +02:00
Ludovic Courtès
669786da91 system: Use "." instead of "source" in /etc/profile.
* gnu/system.scm (etc-directory)[profile]: Use "." instead of "source",
  the latter being Bash-specific.
2015-05-07 09:49:08 +02:00
Ludovic Courtès
507c71d629 system: Check whether ~/.guix-profile/etc/profile exists.
* gnu/system.scm (etc-directory)[profile]: Check for
  ~/.guix-profile/etc/profile rather than just ~/.guix-profile.
2015-05-07 09:49:08 +02:00
Ludovic Courtès
d9959421a5 system: /etc/profile sources each profile's /etc/profile.
Partly fixes <http://bugs.gnu.org/20255>.
Reported by 宋文武 <iyzsong@gmail.com>.

* gnu/system.scm (etc-directory)[profile]: Source
  /run/current-system/profile/etc/profile and
  $HOME/.guix-profile/etc/profile when available.  Move definitions of
  SSL_CERT_DIR, SSL_CERT_FILE, and GIT_SSL_CAINFO before that.
2015-05-06 18:26:54 +02:00
Ludovic Courtès
8e974b9b98 system: Populate /etc/shells with the list of all the shells in use.
Reported by Andy Wingo <wingo@pobox.com>.

* gnu/system.scm (user-shells, shells-file): New procedures.
  (etc-directory): Add #:shell parameter.  Use 'shells-file' instead of
  'text-file'.
  (operating-system-etc-directory): Call 'user-shells' and pass #:shells
  to 'etc-directory'.
2015-04-17 13:53:16 +02:00
Ludovic Courtès
b158f1d751 system: Allow users to PTRACE_ATTACH to their own processes.
* gnu/build/activation.scm (activate-ptrace-attach): New procedure.
* gnu/system.scm (operating-system-activation-script): Use it.
2015-04-12 15:33:42 +02:00
Mark H Weaver
5e738ac224 system: Clean /tmp and /var/run during early boot.
* gnu/system.scm (operating-system-boot-script): Clean out /tmp and
  /var/run before activating the system.
2015-04-10 09:22:49 -04:00
Andy Wingo
0d275f4aa3 system: Take kernel modules from the user-specified kernel.
* gnu/system/linux-initrd.scm (base-initrd): Add #:linux option to
  specify the linux kernel to use.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Propagate
  #:linux to base-initrd.
* gnu/system.scm (operating-system-initrd-file): Pass #:linux to
  'make-initrd'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-04-05 23:15:20 +02:00
Ludovic Courtès
1d167b6e37 system: Add /etc/bashrc that loads bash-completion when available.
* gnu/system.scm (etc-directory)[profile]: Conditionally source
  /etc/bashrc.
  [bashrc]: New file.  Source bash_completion.sh when available.
2015-03-12 22:52:18 +01:00
Alexander I.Grafov (Axel)
cd9bc11273 system: Add fish, tcsh, and zsh to /etc/shells.
* gnu/system.scm (etc-directory)[shells]: Add fish, tcsh, and zsh file
  names to /etc/shells.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-03-12 22:52:18 +01:00
Alexander I.Grafov (Axel)
70408ccbe6 system: Remove duplicated line from export.
* gnu/system.scm (gnu system): Remove duplicate in
  exported names list.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-03-12 22:52:18 +01:00
Ludovic Courtès
11dddd8a3e system: Don't compare <pam-service> objects with 'equal?'.
Fixes <http://bugs.gnu.org/20037>.
Reported by 宋文武 <iyzsong@gmail.com> and Tomáš Čech.

* gnu/system.scm (operating-system-etc-directory): Remove call to
  'delete-duplicates'.
* gnu/system/linux.scm (pam-services->directory)[builder]: Add call to
  'delete-duplicates'.
2015-03-10 18:07:48 +01:00
Ludovic Courtès
ce0614ddb0 gnu: Move 'which' to (gnu packages base).
* gnu/packages/which.scm: Remove.
* gnu-system.am (GNU_SYSTEM_MODULES): Remove it.
* gnu/packages/base.scm (which): New variable.
* gnu/packages/aspell.scm, gnu/packages/audio.scm,
  gnu/packages/autogen.scm, gnu/packages/cdrom.scm,
  gnu/packages/compression.scm, gnu/packages/datamash.scm,
  gnu/packages/games.scm, gnu/packages/glib.scm,
  gnu/packages/gnu-pw-mgr.scm, gnu/packages/gnutls.scm,
  gnu/packages/gps.scm, gnu/packages/guile.scm,
  gnu/packages/java.scm, gnu/packages/libevent.scm,
  gnu/packages/linux.scm, gnu/packages/lisp.scm,
  gnu/packages/node.scm, gnu/packages/ntp.scm,
  gnu/packages/orpheus.scm, gnu/packages/pciutils.scm,
  gnu/packages/python.scm, gnu/packages/qt.scm,
  gnu/packages/rsync.scm, gnu/packages/sawfish.scm,
  gnu/packages/scheme.scm, gnu/packages/ssh.scm,
  gnu/packages/statistics.scm, gnu/packages/texlive.scm,
  gnu/packages/wdiff.scm: Adjust accordingly.
2015-03-04 17:23:27 +01:00
Mark H Weaver
78ab0746a5 system: Add /etc/ssl symlink; set needed variables in /etc/profile.
* gnu/build/activation.scm (activate-etc): Create /etc/ssl symlink.
* gnu/system.scm (etc-directory): Set SSL_CERT_DIR, SSL_CERT_FILE,
  and GIT_SSL_CAINFO in /etc/profile.

Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
2015-03-03 13:49:12 -05:00
Mark H Weaver
e33eea8ffd Revert "system: Add 'x509-certificates' field, and populate /etc/ssl/certs."
This reverts commit e979e6dd52.
2015-03-03 13:49:12 -05:00
Mark H Weaver
bd4c47a47e Revert "system: Create a single-file certificate bundle in /etc/ssl/certs."
This reverts commit 993300f6cc.
2015-03-03 13:49:12 -05:00
Ludovic Courtès
993300f6cc system: Create a single-file certificate bundle in /etc/ssl/certs.
Suggested by Mark H Weaver <mhw@netris.org>.

* gnu/system.scm (certificate-bundle): New procedure.
  (etc-directory): Use it.
  [profile]: Set 'SSL_CERT_DIR', 'SSL_CERT_FILE', and 'GIT_SSL_CAINFO'.
2015-03-02 23:05:13 +01:00
Ludovic Courtès
e979e6dd52 system: Add 'x509-certificates' field, and populate /etc/ssl/certs.
* gnu/system.scm (<operating-system>)[x509-certificates]: New field.
  (etc-directory): Add #:x509-certificates parameter and honor it.
  (operating-system-etc-directory): Pass #:x509-certificates in
  'etc-directory' call.
* doc/guix.texi (operating-system Reference): Document
  'x509-certificates'.
2015-03-02 22:32:54 +01:00
Ludovic Courtès
996ed73948 system: Add bindings to configure libc's NSS.
* gnu/system/nss.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
* gnu/system.scm (<operating-system>)[name-service-switch]: New field.
  (etc-directory): Add #:nss parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* doc/guix.texi (operating-system Reference): Document
  'name-service-switch'.
  (Name Service Switch): New section.
2015-02-04 22:49:35 +01:00
Ludovic Courtès
3761792c3a system: Define $ASPELL_CONF in /etc/profile.
* gnu/system.scm (etc-directory)[profile]: Define 'ASPELL_CONF'.
2015-01-28 10:56:04 +01:00
宋文武
00239d0594 system: Add 'XDG_DATA_DIRS' and 'XDG_CONFIG_DIRS' to /etc/profile.
* gnu/system.scm (etc-directory)[profile]: Set 'XDG_DATA_DIRS' and
  'XDG_CONFIG_DIRS'.
2015-01-27 13:49:02 +08:00
Ludovic Courtès
8c9267a448 system: Make D-Bus warnings non fatal.
* gnu/system.scm (etc-directory): Add 'DBUS_FATAL_WARNINGS' in PROFILE.
2015-01-22 23:47:13 +01:00
Ludovic Courtès
0a0517690d system: Create /etc/emacs/site-start.el.
* gnu/system.scm (emacs-site-file, emacs-site-directory): New
  procedures.
  (etc-directory): Add 'EMACSLOADPATH' setting to PROFILE.  Call
  'emacs-site-directory', and bind its result to /etc/emacs.
2015-01-22 23:42:15 +01:00
Ludovic Courtès
be68177368 system: Add iw to '%base-packages'.
* gnu/system.scm (%base-packages): Add IW.
2015-01-13 18:16:35 +01:00
Ludovic Courtès
a8a086e392 system: Add sudo to '%base-packages'.
* gnu/system.scm (%base-packages): Add SUDO.
2014-12-13 16:22:34 +01:00
Ludovic Courtès
97ab2c0fb6 system: /etc/profile defines 'MANPATH', which includes the global profile.
* gnu/system.scm (etc-directory)[profile]: Set 'MANPATH'.
2014-12-13 00:01:06 +01:00
宋文武
4e2a21d3d2 system: Cleanup bash startup files.
* gnu/system.scm (etc-directory) (bashrc): Rename to 'profile'.
* gnu/system/shadow.scm (default-skeletons): Rename '.bashrc' to
  '.bash_profile'. Don't source /etc/profile.
2014-12-09 18:51:01 +08:00
Ludovic Courtès
18316d8656 system: Add 'man-db' to '%base-packages'.
Suggested by Tsutsukakushi on #guix.

* gnu/system.scm (%base-packages): Add MAN-DB.
2014-12-07 22:59:46 +01:00
Ludovic Courtès
9cb426b8bf Revert "system: Add a 'needed-for-boot?' field to 'mapped-device'."
This reverts commit 3b09332adf, which
turned out to be a bad idea because we need to have dependency
information between the device-mapping service and the file-system
service that uses it.
2014-11-30 18:54:07 +01:00
Ludovic Courtès
3b09332adf system: Add a 'needed-for-boot?' field to 'mapped-device'.
* gnu/system/file-systems.scm (<mapped-device>)[needed-for-boot?]: New
  field.
* gnu/system.scm (operating-system-user-mapped-devices,
  operating-system-boot-mapped-devices): Use it instead of trying to
  guess.  Guessing doesn't work when one refers to a partition using its
  label, for instance.
* doc/guix.texi (Mapped Devices): Document 'needed-for-boot?'.
2014-11-29 14:40:26 +01:00
Ludovic Courtès
0e704a2d4e linux-boot: Load modules and their dependencies, à la 'modprobe'.
* gnu/build/linux-boot.scm: Use (gnu build linux-modules).
  (load-linux-module*): Remove.
  (boot-system): Add #:linux-module-directory parameter.
  [lookup-module]: New procedure.
  Call 'current-module-debugging-port'.  Pass #:lookup-module to
  'load-linux-module*'.  Map LOOKUP-MODULE on LINUX-MODULES.
* gnu/system/linux-initrd.scm (base-initrd): Adjust 'boot-system' call
  accordingly.  Adjust #:modules argument as well.
* gnu/system.scm (operating-system-activation-script)[%modules]: Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-11-28 00:10:28 +01:00
Ludovic Courtès
598e19dca1 system: Build system-wide locale definitions.
* gnu/system/locale.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system.scm (<operating-system>)[locale]: Change the default to
  "en_US.utf8".
  (operating-system-locale-directory): New procecure.
  (operating-system-derivation): Use it.
* doc/guix.texi (Using the Configuration System): Change example locale
  to "fr_FR.utf8".
  (operating-system Reference): Add xref to "Locales".  Document
  'locale-definitions'.
  (Locales): New section.
* po/guix/POTFILES.in: Add gnu/system.scm.
2014-11-27 08:55:46 +01:00
Ludovic Courtès
4d6b879cb5 file-systems: 'file-system-needed-for-boot?' always returns #t for "/".
Reported by Nikita Karetnikov.

* gnu/system/file-systems.scm (<file-system>): Rename 'needed-for-boot?'
  accessor to '%file-system-needed-for-boot?'.
  (file-system-needed-for-boot?): New inlinable procedure.
* gnu/system.scm (other-file-system-services)[file-systems]: Rely on
  'file-system-needed-for-boot?' to handle the "/" case.
  (operating-system-initrd-file)[boot-file-systems]: Likewise.
2014-11-25 18:01:59 +01:00
Ludovic Courtès
42de960878 system: Shorten the default label for GRUB entries.
* gnu/system.scm (kernel->grub-label): Shorten entry labels.
2014-11-11 22:42:42 +01:00
Ludovic Courtès
f34c56be3a activation: Set the firmware search path.
* gnu/build/activation.scm (activate-firmware): New procedure.
* gnu/system.scm (<operating-system>)[firmware]: New field.
  (directory-union): New procedure.
  (%base-firmware): New variable.
  (operating-system-activation-script): Use 'directory-union', and call
  'activate-firmware'.
* doc/guix.texi (operating-system Reference): Document 'firmware'.
2014-11-11 22:42:39 +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
95f92d4e2c system: Define 'INFOPATH' in /etc/profile.
* gnu/system.scm (etc-directory)[bashrc]: Set 'INFOPATH'.
2014-11-05 22:59:50 +01:00
Ludovic Courtès
d460204f2e system: Allow Linux-libre to find our 'modprobe' command.
Fixes <http://bugs.gnu.org/18525>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/build/activation.scm (activate-modprobe): New procedure.
* gnu/system.scm (modprobe-wrapper): New procedure.
  (operating-system-activation-script): Use both.
2014-11-02 23:06:17 +01:00
Ludovic Courtès
a96a82d79e system: Add pciutils and pciutils to '%base-packages'.
* gnu/system.scm (%base-packages): Add PCIUTILS and USBUTILS.
2014-10-29 00:31:23 +01:00
Ludovic Courtès
568841d491 system: Export 'local-host-aliases'.
* gnu/system.scm (local-host-aliases): New procedure.
  (default-/etc/hosts): Use it.
2014-10-07 23:18:41 +02:00
Ludovic Courtès
4b164c4532 system: Add Patch to '%base-packages'.
* gnu/system.scm (%base-packages): Add PATCH.
2014-09-22 23:11:33 +02:00
Ludovic Courtès
de1c158f32 system: Add support for boot-time mapped devices.
* gnu/build/linux-boot.scm (boot-system): Add #:pre-mount parameter and
  honor it.
* gnu/system/linux-initrd.scm (base-initrd): Add #:mapped-devices
  parameter.  Add 'device-mapping-commands' variable, and use it to
  build the #:pre-mount argument of 'boot-system'.
* gnu/system.scm (mapped-device-user,
  operating-system-user-mapped-devices,
  operating-system-boot-mapped-devices): New procedures.
  (device-mapping-services): Use 'operating-system-user-mapped-devices'
  instead of 'operating-system-mapped-devices'.
  (operating-system-initrd-file): Call the initrd with #:mapped-devices.
2014-09-22 11:20:41 +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
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
ba544e78dc system: Add Diffutils to '%base-packages'.
* gnu/system.scm (%base-packages): Add DIFFUTILS.
2014-09-13 10:52:21 +02:00
Ludovic Courtès
a68c69675f system: Add more common tools to '%base-packages'.
* gnu/system.scm (%base-packages): Add gawk, tar, gzip, bzip2, xz, lzip,
  and wireless-tools.
2014-09-12 22:13:49 +02:00
Ludovic Courtès
07b08343d7 system: Produce a basic /etc/nsswitch.conf to honor /etc/hosts.
* gnu/system.scm (etc-directory): Produce nsswitch.conf.
2014-09-12 09:55:25 +02:00
Ludovic Courtès
7d6a52c0dc system: Fix the default /etc/hosts.
* gnu/system.scm (default-/etc/hosts): Fix the alias/address order.
  Add ::1.
2014-09-12 09:52:05 +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
c851400bee system: Add '\w' to the default PS1.
* gnu/system.scm (etc-directory)[bashrc]: Add '\w' to PS1.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
ee248b6a70 activation: Make the /bin/sh symlink at activation time.
* gnu/build/install.scm (directives): Remove "/bin/sh".
* gnu/build/activation.scm (activate-/bin/sh): New procedure.
* gnu/system.scm (operating-system-activation-script): Use it.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
c65e183403 system: Add 'hosts-file' field.
* gnu/system.scm (<operating-system>)[hosts-file]: New field.
  (default-/etc/hosts): New procedure.
  (etc-directory): Add #:hosts-file parameter and honor it.
  (operating-system-etc-directory): Build /etc/hosts, and pass
  it as #:hosts-file to 'etc-directory'.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
df5ce088f2 system: Export '%setuid-programs'.
* gnu/system.scm: Export '%setuid-programs', as documented in the
  manual.
2014-09-09 17:12:33 +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
29fce8b6eb system: Use (guix profiles) to build the system profile.
* gnu/system.scm (union): Remove.
  (operating-system-profile): Use 'profile-derivation' and related
  procedures instead of 'union'.
2014-08-11 23:01:46 +02:00
Ludovic Courtès
c8fa34265d system: Add the 'system?' field for user groups.
Suggested by Mark H. Weaver.

* gnu/system/shadow.scm (<user-group>)[system?]: New field.
  (%base-groups): Introduce 'system-group' macro, and use it.
* gnu/system.scm (user-group->gexp): Pass the 'system?' field.
* guix/build/activation.scm (add-group): Add #:system? and honor it.
  (activate-users+groups): Handle the 'system?' field.
* gnu/system/file-systems.scm (%tty-gid): Choose an ID below 1000.
* doc/guix.texi (User Accounts): Document the 'system?' field.
2014-07-25 00:12:35 +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
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
b63dbd44f0 system: Add e2fsprogs to the base packages.
* gnu/system.scm (%base-packages): Add E2FSPROGS.
2014-07-16 15:54:47 +02:00
Ludovic Courtès
03e9998f41 system: Use kmod instead of module-init-tools.
* gnu/system.scm (%base-packages): Use kmod instead of
  module-init-tools.
2014-07-16 15:54:47 +02:00
Ludovic Courtès
55e70e655d system: Add 'nano' and 'lsof' to the base packages.
* gnu/system.scm (%base-packages): Add NANO and LSOF.
2014-07-14 15:35:57 +02:00
Ludovic Courtès
89a0d00a38 system: Add 'which' to the base packages.
* gnu/system.scm (%base-packages): Add WHICH.
2014-07-12 23:17:54 +02:00
Ludovic Courtès
f111b327a9 system: Remove erroneous system binding in profile maker.
Partly fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.

* gnu/system.scm (union): Remove #:system parameter, which was unused.
2014-07-12 23:17:53 +02:00
Ludovic Courtès
060238ae64 linux-initrd: Rename 'qemu-initrd' to 'base-initrd'.
* gnu/system/linux-initrd.scm (qemu-initrd): Rename to...
  (base-initrd): ... this.
* gnu/system.scm (<operating-system>)[initrd]: Update accordingly.
* gnu/system/vm.scm (expression->derivation-in-linux-vm,
  system-disk-image, virtualized-operating-system): Likewise.
2014-07-01 09:23:32 +02:00
Ludovic Courtès
62f0a4792b system: Set $LINUX_MODULE_DIRECTORY as a function or /run/booted-system.
* gnu/system.scm (etc-directory): Remove #:kernel parameter.  Set
  LINUX_MODULE_DIRECTORY as a function or /run/booted-system.
  (operating-system-etc-directory): Update accordingly.
2014-06-29 22:02:42 +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
8a6d273137 system: Adjust the set of fields with default values.
* gnu/system.scm (<operating-system>)[file-systems]: Remove default.
  [locale]: Add default value.
2014-06-27 00:12:40 +02:00
Ludovic Courtès
b25937e318 guix system: Add 'reconfigure' action.
* guix/scripts/system.scm (%system-profile): New variable.
  (switch-to-system, previous-grub-entries): New procedures.
  (unless-file-not-found): New macro.
  (show-help): Add 'reconfigure'.
  (guix-system): Handle it.
* gnu/system.scm: Export 'operating-system-activation-script'.
* doc/guix.texi (Invoking guix system): Document it.
2014-06-27 00:12:40 +02:00
Ludovic Courtès
fe6e3fe2a5 system: Support the addition of old entries in the GRUB menu.
* gnu/system.scm (operating-system-grub.cfg): Add 'old-entries'
  parameter.  Pass it to 'grub-configuration-file'.
* gnu/system/grub.scm (grub-configuration-file): Add #:old-entries
  parameter.  Honor it.
2014-06-25 23:53:27 +02:00
Ludovic Courtès
64e40dbb69 system: Store boot parameters in the system derivation.
* gnu/system.scm (operating-system-parameters-file): New procedure.
  (operating-system-derivation): Use it to produce a 'parameters' files.
2014-06-25 23:53:27 +02:00
Ludovic Courtès
2d23e6f051 system: Factorize GRUB menu entry label.
* gnu/system.scm (kernel->grub-label): New procedure.
  (operating-system-grub.cfg): Use it.
2014-06-25 23:53:27 +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
773e956d5d system: Augment the default set of groups.
* gnu/system/shadow.scm (%base-groups): New variable.
* gnu/system.scm (<operating-system>)[groups]: Use it as the default.
2014-06-22 22:16:14 +02:00
Ludovic Courtès
9b762b8d7c system: Prefer packages from %FINAL-INPUTS.
* gnu/packages/base.scm (canonical-package): New procedure.
* gnu/system.scm (%base-packages): Pass BASH, COREUTILS, FINDUTILS,
  GREP, and SED through 'canonical-package'.
2014-06-19 23:35:41 +02:00
Ludovic Courtès
d3bbe992ec system: Tell module-init-tools where to look for modules.
* gnu/packages/linux.scm (module-init-tools)[source](patches): New
  field.
* gnu/packages/patches/module-init-tools-moduledir.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/system.scm (etc-directory): Add #:kernel parameter.  Set
  'LINUX_MODULE_DIRECTORY' in bashrc.
  (operating-system-etc-directory): Pass #:kernel to 'etc-directory'.
2014-06-04 18:15:50 +02:00
Ludovic Courtès
4654439be7 system: Rename activation script.
* gnu/system.scm (operating-system-activation-script): Change file name
  to "activate".
2014-06-04 18:15:50 +02:00
Ludovic Courtès
6f436c54d6 system: Define '%base-packages' and use it.
* gnu/system.scm (<operating-system>)[packages]: Change default value to
  %BASE-PACKAGES.
  (%base-packages): New variable.
* gnu/system/install.scm (installation-os): Use it when defining the
  'packages' field.
* doc/guix.texi (Using the Configuration System): Use %BASE-PACKAGES in
  example.  Remove now unneeded module imports.  Explain this.
2014-06-04 18:15:50 +02:00
Ludovic Courtès
585c651951 system: Make sure /run/setuid-programs comes first in $PATH.
* gnu/system.scm (etc-directory) <bashrc>: Move /run/setuid-programs
  first in $PATH.
2014-06-03 11:48:41 +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
548d4c1395 system: Add 'issue' field.
* gnu/system.scm (<operating-system>)[issue]: New field.
  (%default-issue): New variable.
  (etc-directory): Add #:issue parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* build-aux/hydra/demo-os.scm: Add 'issue' field.
2014-05-31 22:01:05 +02:00
Ludovic Courtès
8a07c28960 system: Add 'fusermount' to the default setuid programs.
* gnu/system.scm (%setuid-programs): Add 'fusermount'.
2014-05-29 23:32:46 +02:00
Ludovic Courtès
55ccc388b7 services: Support per-service activation scripts.
* gnu/services.scm (<service>)[activate]: New field.
* gnu/system.scm (operating-system-activation-script)[service-activations]:
  New procedure.  Use it, and primitive-load each activation.
2014-05-24 18:10:05 +02:00
Ludovic Courtès
484a2b3a5a system: Separate the activation script from the boot script.
* gnu/system.scm (operating-system-activation-script): New procedure,
  containing most of the former 'operating-system-boot-script'.
  (operating-system-boot-script): Call it, and 'primitive-load' its
  result.
* guix/build/activation.scm (%booted-system): Remove.
  (activate-current-system): Remove #:boot? parameter and related code.
2014-05-24 18:10:05 +02:00
Ludovic Courtès
c5df183956 Add (gnu system file-systems).
This fixes a circular dependency between (gnu system) and (gnu system
linux-initrd), where the latter could end up being compiled before
'file-system-type' was defined as a macro.

* gnu/system.scm (<file-system>, %fuse-control-file-system,
  %binary-format-file-system): Move to...
* gnu/system/file-systems.scm: ... here.  New file.
* build-aux/hydra/demo-os.scm, gnu/system/linux-initrd.scm,
  gnu/system/vm.scm: Use it.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
2014-05-20 23:37:11 +02:00
Ludovic Courtès
d5b429abda system: Add 'grub-configuration' record.
* gnu/system/grub.scm (<grub-configuration>): New record type.
  (grub-configuration-file): Add 'config' parameter; remove
  #:default-entry and #:timeout.  Honor CONFIG.
* gnu/system.scm (<operating-system>): Remove 'bootloader-entries'
  field; remove default value for 'bootloader' field.
  (operating-system-grub.cfg): Pass the 'bootloader' field to
  'grub-configuration-file'.
* build-aux/hydra/demo-os.scm (bootloader): New field.
2014-05-18 22:27:23 +02:00
Ludovic Courtès
b4140694ac system: Make /run/current-system at activation time.
* gnu/system.scm (etc-directory): Change default value of #:profile.
  Change contents of SHELLS.  Use /run/current-system/profile/{s,}bin in
  BASHRC.
  (operating-system-boot-script)[%modules]: Add (guix build
  linux-initrd).  Add call to 'activate-current-system' in gexp.
  (operating-system-initrd-file, operating-system-grub.cfg): New
  procedures.
  (operating-system-derivation): Don't build grub.cfg here and remove it
  from the file union.
* gnu/system/vm.scm (qemu-image): Remove #:populate.
  (operating-system-build-gid, operating-system-default-contents):
  Remove.
  (system-qemu-image): Remove call to
  'operating-system-default-contents'.  Use 'operating-system-grub.cfg'
  to get grub.cfg.  Add GRUB.CFG to #:inputs.
  (system-qemu-image/shared-store): Likewise, but don't add GRUB.CFG to
  #:inputs.
  (system-qemu-image/shared-store-script): Pass --system kernel option.
* guix/build/activation.scm (%booted-system, %current-system): New
  variables.
  (boot-time-system, activate-current-system): New procedures.
* guix/build/install.scm (evaluate-populate-directive): Add case
  for ('directory name uid gid mode).
  (directives, populate-root-file-system): New procedures.
* guix/build/vm.scm (initialize-hard-disk): Replace calls to
  'evaluate-populate-directive' by a call to
  'populate-root-file-system'.
* gnu/services/dmd.scm (dmd-configuration-file): Use
  /run/current-system/profile/bin.
* gnu/services/xorg.scm (slim-service): Likewise.
2014-05-18 00:04:01 +02:00
Ludovic Courtès
2717a89a84 system: Provide declarations for the 'fusectl' and 'binfmt_misc' file systems.
* gnu/system.scm (%fuse-control-file-system,
  %binary-format-file-system): New variables.
* build-aux/hydra/demo-os.scm (file-systems): New field.
2014-05-14 23:17:03 +02:00
Ludovic Courtès
838d9a9ddb system: Move skeleton code to (gnu system shadow).
* gnu/system.scm (default-skeletons, skeleton-directory): Move to...
* gnu/system/shadow.scm: ... here.
2014-05-14 01:02:46 +02:00
Ludovic Courtès
1a389e8d21 system: Add skeleton '.gdbinit'.
* gnu/system.scm (default-skeletons): Add .gdbinit.
2014-05-14 01:02:46 +02:00
Ludovic Courtès
40281c5424 system: Populate /etc/skel.
* gnu/system.scm (<operating-system>)[skeletons]: New field.
  (default-skeletons, skeleton-directory): New procedures.
  (etc-directory): Add #:skeletons parameter.  Call
  'skeleton-directory', and produce the 'skel' sub-directory.
  (operating-system-etc-directory): Pass #:skeletons to
  'etc-directory'.
2014-05-12 23:55:28 +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
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
26a728eb09 linux-initrd: Delete files from the initrd ramfs when switching roots.
* guix/build/linux-initrd.scm (switch-root): Delete file from the old
  root.  Chdir to / after 'chroot' call.  Re-open file descriptors 0, 1,
  and 2.
  (boot-system): Move 'loading' message after the 'switch-root' call.
* gnu/system.scm (operating-system-boot-script): Add loop that closes
  file descriptor before calling 'execl'.
2014-05-06 18:18:22 +02:00
Ludovic Courtès
3c05b4bc25 linux-initrd: Check the root and other early file systems.
* gnu/system.scm (operating-system-derivation)[boot-file-systems]: Keep "/".
* gnu/system/linux-initrd.scm (file-system->spec): Keep the 'check?'
  flag.
  (qemu-initrd)[helper-packages]: New variable.  Pass it as #:to-copy.
  <gexp>: Add 'set-path-environment-variable' call.  Remove #:unionfs
  argument for 'boot-system'.
* gnu/system/vm.scm (%linux-vm-file-systems): Add 'check?' field/
  (virtualized-operating-system): Likewise for the "9p" file system.
* guix/build/linux-initrd.scm (mount-root-file-system): Change #:unionfs
  default.  Call 'check-file-system' before mounting ROOT, when
  VOLATILE-ROOT? is false.
  (check-file-system): New procedure.
  (mount-file-system): Honor 'check?' element in list; add
  'check-file-system' call.
  (boot-system): Remove #:root-fs-type and #:unionfs parameters.
  [root-mount-point?, root-fs-type]: New variables.
  Call 'mount-file-system' on all MOUNTS but "/".
2014-05-04 00:30:39 +02:00
Ludovic Courtès
83bcd0b895 system: Add first-class file system declarations.
* gnu/system.scm (<operating-system>)[initrd]: Default to
  'qemu-initrd'.
  (<file-system>): New record type.
  (operating-system-root-file-system): New procedure.
  (operating-system-derivation): Take the device name for GRUB from
  'operating-system-root-file-system'.  Pass the
  'operating-system-initrd' procedure the list of boot file systems.
* gnu/system/linux-initrd.scm (file-system->spec): New procedure.
  (qemu-initrd): Add 'file-systems' parameter, and remove #:mounts
  parameter.
  [file-system-type-predicate]: New procedure.
  [linux-modules]: Use it.
  Adjust #:mounts argument in 'boot-system' call.
  (gnu-system-initrd): Remove.
* gnu/system/vm.scm (%linux-vm-file-systems): New variable.
  (expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'.
  (virtualized-operating-system): New procedure.
  (system-qemu-image/shared-store-script)[initrd]: Remove.  Use
  'virtualized-operating-system'.  Get the 'initrd' file from OS-DRV.
* guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p):
  Remove.
  (MS_RDONLY, MS_BIND): New global variables.
  (bind-mount): Remove local 'MS_BIND' definition.
  (mount-root-file-system): New procedure, with code formerly in
  'boot-system'.
  (mount-file-system): New procedure.
  (boot-system): Add #:root-fs-type parameter.  Remove 'MS_RDONLY' local
  variable.  Use 'mount-root-file-system' and 'mount-file-system'.
* doc/guix.texi (Using the Configuration System): Add 'file-system'
  declaration.
2014-05-03 00:46:51 +02:00
Ludovic Courtès
696893801c system: Add 'sudo' to the setuid programs, and handle /etc/sudoers.
* gnu/system.scm (<operating-system>)[groups]: Change default to just
  the 'root' group.
  [sudoers]: New field.
  (etc-directory): Add #:sudoers parameter.  Add 'sudoers' to the
  file union.
  (operating-system-etc-directory): Pass #:sudoers to 'etc-directory'.
  (%setuid-programs): Add 'sudo'.
  (%sudoers-specification): New variable.
* gnu/system/linux.scm (base-pam-services): Add 'sudo'.
* build-aux/hydra/demo-os.scm: Add 'groups' field; add 'guest' to the
  'wheel' group.
2014-05-01 22:31:36 +02:00
Ludovic Courtès
09e028f45f system: Add support for setuid binaries.
* gnu/system.scm (<operating-system>)[pam-services, setuid-programs]:
  New fields.
  (etc-directory)[bashrc]: Prepend /run/setuid-programs to $PATH.
  (operating-system-etc-directory): Honor
  'operating-system-pam-services'.
  (%setuid-programs): New variable.
  (operating-system-boot-script): Add (guix build utils) to the set of
  imported modules.  Call 'activate-setuid-programs' in boot script.
* gnu/system/linux.scm (base-pam-services): New procedure.
* guix/build/activation.scm (%setuid-directory): New variable.
  (activate-setuid-programs): New procedure.
* build-aux/hydra/demo-os.scm: Add 'pam-services' field.
2014-04-30 23:16:23 +02:00
Ludovic Courtès
4dfe6c58ee system: Add (guix build activation).
* gnu/services/dmd.scm (dmd-configuration-file): Remove 'etc'
  parameter.  Move /etc activation code to...
* guix/build/activation.scm: ... here; new file.
* gnu/system.scm (operating-system-boot-script): Augment script: add
  (guix build activation) to the load path; call 'activate-etc'.
* Makefile.am (MODULES): Add guix/build/activation.scm.
2014-04-30 23:16:22 +02:00
Ludovic Courtès
8c35bfb68c system: Rewrite 'union' using gexps.
* gnu/system.scm (union): Rewrite using 'gexp->derivation'.
2014-04-28 23:41:12 +02:00
Ludovic Courtès
f6a7b21df7 system: grub: Rewrite using gexps.
* gnu/system/grub.scm (grub-configuration-file): Rewrite using
  'gexp->derivation'.
* gnu/system.scm (operating-system-derivation): Adjust accordingly.
2014-04-28 23:41:08 +02:00
Ludovic Courtès
23f6056b50 system: Change 'file-union' to use gexps.
* gnu/system.scm (file-union): Make 'name' the first parameter; remove
  'inputs' parameter.  Rewrite using 'gexp->derivation'.
  (etc-directory): Adjust accordingly.
  (operating-system-derivation): Ditto.
2014-04-28 23:24:18 +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
1aa0033b64 vm: Rewrite support procedures to use gexps.
* gnu/system/vm.scm (%imported-modules): Remove.
  (expression->derivation-in-linux-vm): Remove 'inputs' parameter.
  Rename 'imported-modules' to 'modules'.  Rewrite using gexps and
  'gexp->derivation'.
  (qemu-image): Add 'qemu' parameter.  Pass NAME to
  'expression->derivation-in-linux-vm'.  Rewrite using gexps.  Remove
  #:inputs argument to 'expression->derivation-in-linux-vm'.
  (operating-system-default-contents): Rewrite using gexps.
* gnu/system.scm (operating-system-profile-derivation): Rename to...
  (operating-system-profile): ... this.  Adjust callers.
  (operating-system-profile-directory): Remove.
2014-04-28 23:24:18 +02:00
Ludovic Courtès
02100028bb gnu: Use gexps in obvious places in (gnu system ...).
* gnu/system.scm (operating-system-boot-script): Use 'gexp->file'
  instead of 'text-file*'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
  (system-qemu-image/shared-store-script)[builder]: Turn into a gexp.
  Use 'gexp->derivation' instead of 'derivation-expression'.
2014-04-28 23:24:17 +02:00
Ludovic Courtès
2106d3fc81 system: Add 'operating-system-boot-script'.
* gnu/system.scm (operating-system-boot-script): New procedure.
  (operating-system-derivation): Use it.  Remove DMD-CONF from the
  file union.  Add BOOT-DRV to the inputs.
2014-04-23 16:52:14 +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
b2bfa32d25 Merge branch 'master' into core-updates
Conflicts:
	gnu-system.am
2014-02-22 00:27:57 +01:00
Ludovic Courtès
9038298cbf gnu: Add /etc/shells.
* gnu/system.scm (etc-directory): Add /etc/shells.
2014-02-19 21:30:16 +01: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
Ludovic Courtès
ea0e9ce2e6 gnu: Move root's home directory to /root.
* gnu/system.scm (operating-system-derivation): Change root's
  'home-directory' to "/root".
* gnu/system/vm.scm (operating-system-default-contents): Add /root.
2014-02-08 00:18:25 +01:00
Ludovic Courtès
7aec36830f gnu: system: Build /etc/localtime.
* gnu/system.scm (etc-directory)[bashrc]: Use 'text-file*' instead of
  'text-file'.  Adjust users accordingly.
  [files]: Add the /etc/localtime file for TIMEZONE.
  Add TZDATA to the 'file-union' inputs.
  (operating-system-derivation): Pass 'etc-directory' PROFILE-DRV
  instead of PROFILE.
2014-02-05 22:22:51 +01:00
Ludovic Courtès
f6a9d0484c gnu: vm: Add /run/current-system and /bin/sh.
* gnu/system/vm.scm (operating-system-default-contents): Populate
  /run/current-system and create /bin/sh.
* gnu/system.scm (operating-system-profile-derivation,
  operating-system-profile-directory): New procedures.
  (operating-system-derivation): Use it.
2014-02-02 01:34:33 +01:00