summaryrefslogtreecommitdiff
path: root/gnu/system/file-systems.scm
Commit message (Collapse)AuthorAge
* Instantiate nscd in each system container.Jason Conroy2020-10-01
| | | | | | | | | | * gnu/system/linux-container.scm (%nscd-container-caches): New variable. (containerized-operating-system): Instantiate nscd-service with smaller caches and add it to the generated operating-system, replacing any nscd-service specified by the caller. * gnu/system/file-systems.scm: (%network-file-mappings): Remove "/var/run/nscd". Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* file-systems: Leave room for extension in serialized specs.Ludovic Courtès2020-08-03
| | | | | * gnu/system/file-systems.scm (spec->file-system): Ignore extra fields. (file-system->spec): Add comment.
* file-system: Add efivarfs support.Mathieu Othacehe2020-07-31
| | | | | | | | | | | | | | | | | | Tools such as efibootmgr rely on the deprecated /sys/firmware/efi/vars API as well as on the new /sys/firmware/efi/efivars API. The latter needs to be mounted. Reported by Keyhenge here: https://lists.gnu.org/archive/html/bug-guix/2020-04/msg00274.html Here is the efivarfs documentation: https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt. * gnu/system/file-systems.scm (%efivars-file-system): New exported variable, (%base-file-systems): add it. * gnu/system/install.scm (%efivars-file-system): Add it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* file-system: Add mount-may-fail? option.Mathieu Othacehe2020-07-31
| | | | | | | | | | * gnu/system/file-systems.scm (<file-system>): Add a mount-may-fail? field. (file-system->spec): adapt accordingly, (spec->file-system): ditto. * gnu/build/file-systems.scm (mount-file-system): If 'system-error is raised and mount-may-fail? is true, ignore it. Otherwise, re-raise the exception. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* file-systems: Add %debug-file-system.Mathieu Othacehe2020-07-31
| | | | | * gnu/system/file-systems.scm (%debug-file-system): New variable, (%base-file-systems): add it.
* file-systems: Convey hint via '&fix-hint'.Ludovic Courtès2020-07-25
| | | | | * gnu/system/file-systems.scm (btrfs-store-subvolume-file-name): Use '&fix-hint' for the hint.
* bootloader: grub: Allow booting from a Btrfs subvolume.Maxim Cournoyer2020-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/bootloader/grub.scm (strip-mount-point): Remove procedure. (normalize-file): Add procedure. (grub-configuration-file): New BTRFS-SUBVOLUME-FILE-NAME parameter. When defined, prepend its value to the kernel and initrd file names, using the NORMALIZE-FILE procedure. Adjust the call to EYE-CANDY to pass the BTRFS-SUBVOLUME-FILE-NAME argument. Normalize the KEYMAP file as well. (eye-candy): Add a BTRFS-SUBVOLUME-FILE-NAME parameter, and use it, along with the NORMALIZE-FILE procedure, to normalize the FONT-FILE and IMAGE nested variables. Adjust doc. * gnu/bootloader/depthcharge.scm (depthcharge-configuration-file): Adapt. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise. * gnu/system/file-systems.scm (btrfs-subvolume?) (btrfs-store-subvolume-file-name): New procedures. * gnu/system.scm (operating-system-bootcfg): Specify the Btrfs subvolume file name the store resides on to the `operating-system-bootcfg' procedure, using the new BTRFS-SUBVOLUME-FILE-NAME argument. * doc/guix.texi (File Systems): Add a Btrfs subsection to document the use of subvolumes. * gnu/tests/install.scm (%btrfs-root-on-subvolume-os) (%btrfs-root-on-subvolume-os-source) (%btrfs-root-on-subvolume-installation-script) (%test-btrfs-root-on-subvolume-os): New variables.
* file-systems: Add helpers for parsing the options string into an alist.Maxim Cournoyer2020-05-20
| | | | | | | * gnu/system/file-systems.scm (file-system-options->alist) (alist->file-system-options): New procedures. * tests/file-systems.scm: New tests. * doc/guix.texi (File Systems): Add note about the newly added procedures.
* file-systems: mount the PID cgroup filesystem.Jakub Kądziołka2020-04-27
| | | | | | | * gnu/system/file-systems.scm (%control-groups): Add "pids". * gnu/services/docker.scm (docker-shepherd-service): Resolve a TODO. This has allowed me to make a specific configuration of nsjail work.
* file-systems: Add a 'file-system-device->string' procedure.Maxim Cournoyer2020-03-02
| | | | | | | * gnu/system/file-systems.scm (file-system-device->string): New procedure. * gnu/system.scm (bootable-kernel-arguments): Use it. * gnu/system/vm.scm (operating-system-uuid): Likewise. * guix/scripts/system.scm (display-system-generation): Likewise.
* file-systems: Mount /var/run/nscd read-write in containers.Ludovic Courtès2019-11-04
| | | | | | | | Fixes <https://bugs.gnu.org/37967>. Reported by Ivan Vilata i Balaguer <ivan@selidor.net>. * gnu/system/file-systems.scm (%network-file-mappings): Set 'writable?' to #true for /var/run/nscd.
* file-systems: Add /var/run/nscd to '%network-file-mappings'.Ludovic Courtès2019-09-12
| | | | | | | | | | | | | | | | | | This allows containers created by "guix environment -CN" or by "guix system container -N" to talk to the host nscd. * gnu/system/file-systems.scm (%network-file-mappings): Add "/var/run/nscd". * gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove. * gnu/system/linux-container.scm (container-script)[nscd-run-directory] [nscd-mapping, nscd-os, nscd-specs]: Remove. [script]: Filter out from SPECS bind-mounts where the device does not exist. * guix/scripts/environment.scm (launch-environment/container) [optional-mapping->fs]: New procedure. [mappings]: Remove %NETWORK-FILE-MAPPINGS. [file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through 'optional-mapping->fs'.
* file-systems: Use 'no-atime' for %IMMUTABLE-STORE.Ludovic Courtès2019-07-19
| | | | * gnu/system/file-systems.scm (%immutable-store): Add 'no-atime'.
* install: Use (guix store database) instead of 'guix-register'.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/build/install.scm (register-closure): Add #:reset-timestamps? and and #:schema; honor them. Rewrite in terms of 'register-path'. (populate-single-profile-directory): Add #:schema and honor it. Make /var/guix/profiles and /var/guix/gcroots. * gnu/build/vm.scm (root-partition-initializer): Pass #:reset-timestamps? to 'register-closure'. * gnu/system/vm.scm (not-config?): New procedure. (guile-sqlite3&co): New variable. (expression->derivation-in-linux-vm)[config]: New variable. [builder]: Use 'with-extensions'. (iso9660-image)[schema, config]: New variables. Wrap build expression in 'with-extensions'; add 'sql-schema' call. Remove GUIX from INPUTS. (qemu-image)[schema, config]: New variables. Wrap body in 'with-extensions'. (system-docker-image)[not-config?]: Remove. [config]: Use 'make-config.scm'. [schema]: New variable. [build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX from INPUTS. * gnu/system/file-systems.scm (%store-prefix): Check whether '%store-prefix' is defined. * guix/scripts/pack.scm (self-contained-tarball)[not-config?] [libgcrypt, schema]: New variables. [build]: Wrap in 'with-extensions'. Adjust imported module list to use 'make-config.scm' for (guix config).
* file-systems: Remove 'title' field and add <file-system-label>.Ludovic Courtès2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'title' field was easily overlooked and was an endless source of confusion. Now, the value of the 'device' field is self-contained. * gnu/system/file-systems.scm (<file-system>): Change constructor name to '%file-system'. [title]: Remove. (<file-system-label>): New record type with printer. (report-deprecation, device-expression) (process-file-system-declaration, file-system): New macros. (file-system-title): New procedure. (file-system->spec, spec->file-system): Adjust to handle <file-system-label>. * gnu/system.scm (bootable-kernel-arguments): Add case for 'file-system-label?'. (read-boot-parameters): Likewise. (mapped-device-user): Avoid 'file-system-title'. (fs->boot-device): Remove. (operating-system-boot-parameters): Use 'file-system-device' instead of 'fs->boot-device'. (device->sexp): Add case for 'file-system-label?'. * gnu/bootloader/grub.scm (grub-root-search): Add case for 'file-system-label?'. * gnu/system/examples/bare-bones.tmpl, gnu/system/examples/beaglebone-black.tmpl, gnu/system/examples/lightweight-desktop.tmpl, gnu/system/examples/vm-image.tmpl: Remove uses of 'title'. * gnu/system/vm.scm (virtualized-operating-system): Remove uses of 'file-system-title'. * guix/scripts/system.scm (check-file-system-availability): Likewise, and adjust fix-it hint. (check-initrd-modules)[file-system-/dev]: Likewise. * gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title' parameter. [canonical-title]: Remove. Match on SPEC's type rather than on CANONICAL-TITLE. (mount-file-system): Adjust caller. * gnu/build/linux-boot.scm (boot-system): Interpret ROOT here. * gnu/services/base.scm (file-system->fstab-entry): Remove use of 'file-system-title'. * doc/guix.texi (File Systems): Remove documentation of the 'title' field. Rewrite documentation of 'device' and document 'file-system-label'.
* file-systems: Do not export <file-system>.Ludovic Courtès2018-05-19
| | | | | | * gnu/system/file-systems.scm (<file-system>): Do not export. * gnu/system.scm (operating-system-root-file-system): Use an accessor instead of 'match'.
* file-systems: Expound '%pseudo-file-system-types'.Ludovic Courtès2018-04-29
| | | | | | | Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * gnu/system/file-systems.scm (%pseudo-file-system-types): Add "debugfs", "efivarfs", "hugetlbfs", "overlay", and "securityfs".
* guix system: Report wrong file system 'device' fields.Ludovic Courtès2018-04-27
| | | | | | | | | | | | | | | | Previously, if you wrote (device "my-label") without (title 'label), you'd get: guix system: error: stat: No such file or directory: "my-label" Now you get a proper error and a hint. Reported by Pierre-Antoine Rouby. * guix/scripts/system.scm (check-file-system-availability)[literal]: New variable. Loop over LITERAL. * gnu/system/file-systems.scm (%pseudo-file-system-types): New variable. * guix/ui.scm (display-hint): Make public.
* file-systems: Move %control-groups from %base-file-systems toMathieu Othacehe2017-12-22
| | | | | | | | %elogind-file-systems. * gnu/system/file-systems.scm (%base-file-systems): Move %control-groups from here, to ... (%elogind-file-systems): ... here.
* file-systems: Do not mount hugetlb cgroup filesystem.Mathieu Othacehe2017-12-22
| | | | | | | | On ARM32 without LPAE support, hugetlb control group is not supported. As it is not needed by elogind, remove it for all platforms. * gnu/system/file-systems.scm (%control-groups): Remove hugetlb from control groups platforms.
* file-systems: Preserve UUID types when serializing.Ludovic Courtès2017-10-11
| | | | | | | | | | | Reported by Roel Janssen <roel@gnu.org> at <https://lists.gnu.org/archive/html/help-guix/2017-09/msg00094.html>. * gnu/system/file-systems.scm (file-system->spec): When DEVICE is a UUID, serialize it in a way that preserves its type. (spec->file-system): Adjust accordingly. * gnu/build/file-systems.scm (canonicalize-device-spec): Add case for when SPEC is 'uuid?'.
* file-systems: Add a 'location' field to <file-system>.Ludovic Courtès2017-10-05
| | | | * gnu/system/file-systems.scm (<file-system>)[location]: New field.
* system: Introduce a disjoint UUID type.Ludovic Courtès2017-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conceptually a UUID is just a bytevector. However, there's software out there such as GRUB that relies on the string representation of different UUID types (e.g., the string representation of DCE UUIDs differs from that of ISO-9660 UUIDs, even if they are actually bytevectors of the same length). This new <uuid> record type allows us to preserve information about the type of UUID so we can eventually convert it to a string using the right representation. * gnu/system/uuid.scm (<uuid>): New record type. (bytevector->uuid): New procedure. (uuid): Return calls to 'make-uuid'. (uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?' argument. * gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead of 'bytevector?'. * gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE is 'uuid?'. (read-boot-parameters): Use 'bytevector->uuid' when the store device is a bytevector. (read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'. (device->sexp): New procedure. (operating-system-boot-parameters-file): Use it for 'root-device' and 'store'. (operating-system-bootcfg): Remove conditional in definition of 'root-device'. * gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on DEVICE and take its bytevector. * gnu/system/mapped-devices.scm (open-luks-device): Likewise. * gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the #:volume-uuid argument.
* file-systems: Introduce (gnu system uuid).Ludovic Courtès2017-09-11
| | | | | | | | | | | | | | | * gnu/build/file-systems.scm (sub-bytevector) (latin1->string, %fat32-endianness, fat32-uuid->string) (%iso9660-uuid-rx, string->iso9660-uuid) (iso9660-uuid->string, %network-byte-order) (dce-uuid->string, %uuid-rx, string->dce-uuid) (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid) (vhashq, %uuid-parsers, %uuid-printers, string->uuid) (uuid->string): Move to... * gnu/system/uuid.scm: ... here. New file. * gnu/system/file-systems.scm (uuid): Move to the above file. * gnu/system/vm.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm.
* file-systems: Add missing docstring.Ludovic Courtès2017-03-21
| | | | | * gnu/system/file-systems.scm (file-system-type-predicate): Add docstring.
* file-systems: Do not use (gnu packages …).Ludovic Courtès2017-03-21
| | | | | | | | | | | | | | Fixes a regression introduced in 7208995426714c9fc3ad59cadc3cc0f52df0f018 whereby (gnu system file-systems) would pull in (gnu packages …) module, which in turn breaks when importing things like (gnu build shepherd). * gnu/system/file-systems.scm (file-system-type-predicate): Export. (file-system-packages): Move to... * gnu/system/linux-initrd.scm (file-system-packages): ... here. Add docstring. * gnu/services/base.scm: Use it. * tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
* file-systems: Factorize file-system-packages.Danny Milosavljevic2017-03-18
| | | | | | * gnu/system/linux-initrd.scm (base-initrd): Move helper-packages body to ... * gnu/system/file-systems.scm (file-system-packages): ... here. New variable. Also export it.
* file-systems: Add '%network-configuration-files' and '%network-file-mappings'.Ludovic Courtès2017-02-07
| | | | | | | | * gnu/system/file-systems.scm (%network-configuration-files) (%network-file-mappings): New variables. * guix/scripts/environment.scm (%network-configuration-files): Remove. (launch-environment/container): Refer to '%network-file-mappings' instead of calling 'filter-map'.
* file-systems: Remove dependency on (guix store).Ludovic Courtès2017-02-04
| | | | | | | | | (gnu system file-systems) is used on the "build" side since commit 5970e8e248f6327c41c83b86bb2c89be7c3b1b4e. * gnu/system/file-systems.scm: Remove dependency on (guix store). (%store-prefix): New procedure. * tests/file-systems.scm ("does not pull (guix config)"): New test.
* file-systems: Add 'file-system-mapping->bind-mount'.Ludovic Courtès2017-02-03
| | | | | | | | | * gnu/system/file-systems.scm (file-system-mapping->bind-mount): New procedure. * gnu/system/linux-container.scm (mapping->file-system): Remove. (containerized-operating-system)[mapping->fs]: Use 'file-system-mapping->bind-mount' instead of 'mapping->file-system'. * guix/scripts/environment.scm (launch-environment/container): Likewise.
* file-systems: 'file-system-needed-for-boot?' is #t for parents of the store.Ludovic Courtès2017-01-16
| | | | | | | | | | | | Suggested by John Darrington <john@darrington.wattle.id.au>. * gnu/system/file-systems.scm (%not-slash): New variable. (file-prefix?): New procedure. (file-system-needed-for-boot?): Use it to check whether FS holds the store. * tests/file-systems.scm ("file-system-needed-for-boot?"): New test. * gnu/tests/install.scm (%separate-store-os)[file-systems]: Remove 'needed-for-boot?' field for "/gnu".
* container: Pass a list of <file-system> objects as things to mount.Ludovic Courtès2016-11-10
| | | | | | | | | | | | | | | * gnu/build/linux-container.scm (mount-file-systems): 'mounts' is now a list of <file-system> objects instead of a list of lists ("specs"). Add call to 'file-system->spec' as the argument to 'mount-file-system'. (run-container, call-with-container): Adjust docstring accordingly. * gnu/system/file-systems.scm (spec->file-system): New procedure. * gnu/system/linux-container.scm (container-script)[script]: Call 'spec->file-system' inside gexp. * guix/scripts/environment.scm (launch-environment/container): Remove call to 'file-system->spec'. * tests/containers.scm ("call-with-container, mnt namespace") ("call-with-container, mnt namespace, wrong bind mount"): Pass a list of <file-system> objects.
* Add missing exports.Ludovic Courtès2016-09-27
| | | | | | | | | Reported by Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> at <https://lists.gnu.org/archive/html/guix-devel/2016-09/msg01686.html>. * gnu/system/file-systems.scm (%tty-gid): Export. * guix/build-system/python.scm (default-python, default-python2): Export.
* Reinstate "services: elogind: Provide '%elogind-file-systems' by extension."Ludovic Courtès2016-09-01
| | | | This reverts commit 17073dafc59d62fb8cbb8b94d61d3ecc488ac59f.
* Revert "services: elogind: Provide '%elogind-file-systems' by extension."Mark H Weaver2016-08-22
| | | | This reverts commit 3cf319a3f8e23831960a0f1320122cc514188a37.
* services: elogind: Provide '%elogind-file-systems' by extension.Ludovic Courtès2016-08-22
| | | | | | | * gnu/system/file-systems.scm (%base-file-systems): Remove %ELOGIND-FILE-SYSTEMS. * gnu/services/desktop.scm (elogind-service-type): Extend FILE-SYSTEM-SERVICE-TYPE to provide %ELOGIND-FILE-SYSTEMS.
* ui: Remove dependency on (gnu system file-systems).Ludovic Courtès2016-08-04
| | | | | | * guix/ui.scm (specification->file-system-mapping): Move to... * gnu/system/file-systems.scm (specification->file-system-mapping): ... here.
* file-systems: Remove unneeded import.Ludovic Courtès2016-06-06
| | | | | * gnu/system/file-systems.scm: Remove import of (guix gexp), unneeded since commit 060d62a740fc1932a3be505534feff099b59ac9f.
* system: Add (gnu system mapped-devices).Ludovic Courtès2016-04-18
| | | | | | | | | | * gnu/system/file-systems.scm (<mapped-device>, <mapped-device-type>): Move to... * gnu/system/mapped-devices.scm: ... here. New file. * gnu/system.scm, gnu/services/base.scm, gnu/system/linux-initrd.scm: Use it. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu.scm (%public-modules): Add it.
* gnu: system: Add elogind cgroup mount.Andy Wingo2016-03-07
| | | | | * gnu/system/file-systems.scm (%elogind-file-systems): Add elogind cgroup mount.
* file-systems: Move 'string->uuid' to the build side.Ludovic Courtès2016-01-01
| | | | | | * gnu/system/file-systems.scm (%uuid-rx, string->uuid): Move to... * gnu/build/file-systems.scm (%uuid-rx, string->uuid): ... here. New variables.
* file-systems: Add a 'mount?' field.Ludovic Courtès2015-12-22
| | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22176>. Reported by Florian Paul Schmidt <mista.tapas@gmx.net>. * gnu/system/file-systems.scm (<file-system>)[mount?]: New field. (file-system->spec): Adjust accordingly. * gnu/services/base.scm (file-system-dmd-service): Return the empty list when FILE-SYSTEM has 'mount?' set to false. (user-processes-service): Select the subset of FILE-SYSTEMS that matches 'file-system-mount?'. * doc/guix.texi (File Systems): Document it.
* system: File systems depend on their corresponding device mappings.Ludovic Courtès2015-10-29
| | | | | | | | | | | | | 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.
* linux-boot: Mount /dev as a devtmpfs from the start.Ludovic Courtès2015-09-20
| | | | | | | | | | | | | | | | | | Suggested by Petter <petter@mykolab.ch> and Mark H Weaver <mhw@netris.org>. Reported by Duncan Keall <duncan@duncankeall.com>. Partly fixes <http://bugs.gnu.org/19190> by populating /dev/mapper early enough. * gnu/build/linux-boot.scm (mount-essential-file-systems): Mount /dev as a devtmpfs. (move-essential-file-systems): Add /dev. (mount-root-file-system): Mount /rw-root/dev as a devtmpfs instead of calling 'make-essential-device-nodes'. (boot-system): Remove call to 'make-essential-device-nodes'. * gnu/system/file-systems.scm (%devtmpfs-file-system): Remove. * doc/guix.texi (File Systems): Adjust accordingly.
* file-systems: Add %elogind-file-systems; add it to %base-file-systems.Mark H Weaver2015-09-10
| | | | | * gnu/system/file-systems.scm (%elogind-file-systems): New variable. (%base-file-systems): Add %elogind-file-systems.
* file-systems: Subsystem cgroups now depend on /sys/fs/cgroup.Ludovic Courtès2015-07-17
| | | | | * gnu/system/file-systems.scm (%control-groups): Define 'parent' variable. Initialize the 'dependencies' field for all the subsystems.
* file-systems: Add a 'dependencies' field to <file-system>.Ludovic Courtès2015-07-17
| | | | | | | * 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.
* file-systems: 'uuid' raises a syntax error for invalid UUIDs.Ludovic Courtès2015-07-16
| | | | | | * gnu/system/file-systems.scm (uuid): Call 'syntax-violation' when 'string->uuid' returns #f. * tests/file-systems.scm ("uuid, syntax error"): New test.
* file-systems: Allow users to specify file system UUIDs as strings.Ludovic Courtès2015-07-14
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/19778>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/system/file-systems.scm (%uuid-rx): New variable. (string->uuid): New procedure. (uuid): New macro. * tests/file-systems.scm: New file. * Makefile.am (SCM_TESTS): Add it. * doc/guix.texi (File Systems): Give an example of UUID.
* gnu: file-systems: Fix typo.Mathieu Lirzin2015-07-13
| | | | | * gnu/system/file-systems.scm (%container-file-systems): Fix typo in a comment.