diff options
author | Marius Bakke <marius@gnu.org> | 2022-12-02 19:13:45 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-12-02 19:13:45 +0100 |
commit | f2b6350a507158b2a0ed28ada69d8ca3f544d5e5 (patch) | |
tree | 0dc9a7d9702e912b2fa098942a75e3e925629157 /doc | |
parent | c5e15ef4ddcbe7ebf77b4d24a99707396121cb6c (diff) | |
parent | 365b0b55334ab61e73f368f142af7aa1c3a3d28a (diff) | |
download | guix-f2b6350a507158b2a0ed28ada69d8ca3f544d5e5.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contributing.texi | 7 | ||||
-rw-r--r-- | doc/guix.texi | 77 |
2 files changed, 60 insertions, 24 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi index 40ae33ecac..6a8ffd6524 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1089,11 +1089,16 @@ and then to browse them ``by hand'' using @code{car}, @code{cdr}, notably the fact that it is hard to read, error-prone, and a hindrance to proper type error reports. +@findex define-record-type* +@findex match-record +@cindex pattern matching Guix code should define appropriate data types (for instance, using @code{define-record-type*}) rather than abuse lists. In addition, it should use pattern matching, via Guile’s @code{(ice-9 match)} module, especially when matching lists (@pxref{Pattern Matching,,, guile, GNU -Guile Reference Manual}). +Guile Reference Manual}); pattern matching for records is better done +using @code{match-record} from @code{(guix records)}, which, unlike +@code{match}, verifies field names at macro-expansion time. @node Formatting Code @subsection Formatting Code diff --git a/doc/guix.texi b/doc/guix.texi index e547d469f4..a79b777826 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18409,9 +18409,6 @@ udev rules can be provided as a list of files through the @var{rules} variable. The procedures @code{udev-rule}, @code{udev-rules-service} and @code{file->udev-rule} from @code{(gnu services base)} simplify the creation of such rule files. - -The @command{herd rules udev} command, as root, returns the name of the -directory containing all the active udev rules. @end deffn @deffn {Scheme Procedure} udev-rule [@var{file-name} @var{contents}] @@ -18940,9 +18937,8 @@ gexps to introduce job definitions that are passed to mcron ;; job's action as a Scheme procedure. #~(job '(next-hour '(3)) (lambda () - (execl (string-append #$findutils "/bin/updatedb") - "updatedb" - "--prunepaths=/tmp /var/tmp /gnu/store")) + (system* (string-append #$findutils "/bin/updatedb") + "--prunepaths=/tmp /var/tmp /gnu/store")) "updatedb")) (define garbage-collector-job @@ -18980,6 +18976,12 @@ the job would appear as ``Lambda function'' in the output of @command{herd schedule mcron}, which is not nearly descriptive enough! @end quotation +@quotation Tip +Avoid calling the Guile procedures @code{execl}, @code{execle} or +@code{execlp} inside a job specification, else mcron won't be able to +output the completion status of the job. +@end quotation + For more complex jobs defined in Scheme where you need control over the top level, for instance to introduce a @code{use-modules} form, you can move your code to a separate program using the @code{program-file} procedure of the @@ -19581,6 +19583,10 @@ This is the list of available plugins for virtual private networks (VPNs). An example of this is the @code{network-manager-openvpn} package, which allows NetworkManager to manage VPNs @i{via} OpenVPN. +@item @code{iwd?} (default: @code{#f}) +NetworkManager will use iwd as a backend for wireless networking if this +option is set to @code{#t}, otherwise it will use wpa-supplicant. + @end table @end deftp @@ -37991,8 +37997,9 @@ The type of a bootloader configuration declaration. @cindex BIOS, bootloader The bootloader to use, as a @code{bootloader} object. For now @code{grub-bootloader}, @code{grub-efi-bootloader}, -@code{grub-efi-netboot-bootloader}, @code{grub-efi-removable-bootloader}, -@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported. +@code{grub-efi-removable-bootloader}, @code{grub-efi-netboot-bootloader}, +@code{grub-efi-netboot-removable-bootloader}, @code{extlinux-bootloader} +and @code{u-boot-bootloader} are supported. @cindex ARM, bootloaders @cindex AArch64, bootloaders @@ -38001,15 +38008,29 @@ modules. In particular, @code{(gnu bootloader u-boot)} contains definitions of bootloaders for a wide range of ARM and AArch64 systems, using the @uref{https://www.denx.de/wiki/U-Boot/, U-Boot bootloader}. +@vindex grub-bootloader +@code{grub-bootloader} allows you to boot in particular Intel-based machines +in ``legacy'' BIOS mode. + @vindex grub-efi-bootloader @code{grub-efi-bootloader} allows to boot on modern systems using the @dfn{Unified Extensible Firmware Interface} (UEFI). This is what you should use if the installation image contains a @file{/sys/firmware/efi} directory when you boot it on your system. -@vindex grub-bootloader -@code{grub-bootloader} allows you to boot in particular Intel-based machines -in ``legacy'' BIOS mode. +@vindex grub-efi-removable-bootloader +@code{grub-efi-removable-bootloader} allows you to boot your system from +removable media by writing the GRUB file to the UEFI-specification location of +@file{/EFI/BOOT/BOOTX64.efi} of the boot directory, usually @file{/boot/efi}. +This is also useful for some UEFI firmwares that ``forget'' their configuration +from their non-volatile storage. Like @code{grub-efi-bootloader}, this can only +be used if the @file{/sys/firmware/efi} directory is available. + +@quotation Note +This @emph{will} overwrite the GRUB file from any other operating systems that +also place their GRUB file in the UEFI-specification location; making them +unbootable. +@end quotation @vindex grub-efi-netboot-bootloader @code{grub-efi-netboot-bootloader} allows you to boot your system over network @@ -38018,9 +38039,10 @@ build a diskless Guix system. The installation of the @code{grub-efi-netboot-bootloader} generates the content of the TFTP root directory at @code{targets} (@pxref{Bootloader -Configuration, @code{targets}}), to be served by a TFTP server. You may -want to mount your TFTP server directories onto the @code{targets} to -move the required files to the TFTP server automatically. +Configuration, @code{targets}}) below the sub-directory @file{efi/Guix}, to be +served by a TFTP server. You may want to mount your TFTP server directories +onto the @code{targets} to move the required files to the TFTP server +automatically during installation. If you plan to use an NFS root file system as well (actually if you mount the store from an NFS share), then the TFTP server needs to serve the file @@ -38049,25 +38071,34 @@ this constellation the symlinks will work. For other constellations you will have to program your own bootloader installer, which then takes care to make necessary files from the store accessible through TFTP, for example by copying them into the TFTP root -directory to your @code{targets}. +directory for your @code{targets}. It is important to note that symlinks pointing outside the TFTP root directory may need to be allowed in the configuration of your TFTP server. Further the store link exposes the whole store through TFTP@. Both points need to be -considered carefully for security aspects. +considered carefully for security aspects. It is advised to disable any TFTP +write access! + +Please note, that this bootloader will not modify the ‘UEFI Boot Manager’ of +the system. Beside the @code{grub-efi-netboot-bootloader}, the already mentioned TFTP and NFS servers, you also need a properly configured DHCP server to make the booting over netboot possible. For all this we can currently only recommend you to look for instructions about @acronym{PXE, Preboot eXecution Environment}. -@vindex grub-efi-removable-bootloader -@code{grub-efi-removable-bootloader} allows you to boot your system from -removable media by writing the GRUB file to the UEFI-specification location of -@file{/EFI/BOOT/BOOTX64.efi} of the boot directory, usually @file{/boot/efi}. -This is also useful for some UEFI firmwares that ``forget'' their configuration -from their non-volatile storage. Like @code{grub-efi-bootloader}, this can only -be used if the @file{/sys/firmware/efi} directory is available. +If a local EFI System Partition (ESP) or a similar partition with a FAT +file system is mounted in @code{targets}, then symlinks cannot be +created. In this case everything will be prepared for booting from +local storage, matching the behavior of @code{grub-efi-bootloader}, with +the difference that all GRUB binaries are copied to @code{targets}, +necessary for booting over the network. + +@vindex grub-efi-netboot-removable-bootloader +@code{grub-efi-netboot-removable-bootloader} is identical to +@code{grub-efi-netboot-bootloader} with the exception that the +sub-directory @file{efi/boot} will be used instead of @file{efi/Guix} to +comply with the UEFI specification for removable media. @quotation Note This @emph{will} overwrite the GRUB file from any other operating systems that |