diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-08-24 14:52:39 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-08-24 23:23:57 +0200 |
commit | 0d203eeaa69a42a914a9981449805014ab6b7b77 (patch) | |
tree | d365e8bc9d212b3134bf0187f3425e475f9f4a8e /doc/guix.texi | |
parent | 54a87b2a0cce10be256571a975e116cb60fb0f76 (diff) | |
download | guix-0d203eeaa69a42a914a9981449805014ab6b7b77.tar guix-0d203eeaa69a42a914a9981449805014ab6b7b77.tar.gz |
services: unattended-upgrade: Add 'operating-system-file' field.
* gnu/services/admin.scm (<unattended-upgrade-configuration>)[operating-system-file]:
New field.
(unattended-upgrade-mcron-jobs): Honor it.
* doc/guix.texi (Unattended Upgrades): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 4264ce5194..fed904411a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15393,6 +15393,29 @@ This gexp specifies the channels to use for the upgrade (@pxref{Channels}). By default, the tip of the official @code{guix} channel is used. +@item @code{operating-system-file} (default: @code{"/run/current-system/configuration.scm"}) +This field specifies the operating system configuration file to use. +The default is to reuse the config file of the current configuration. + +There are cases, though, where referring to +@file{/run/current-system/configuration.scm} is not enough, for instance +because that file refers to extra files (SSH public keys, extra +configuration files, etc.) @i{via} @code{local-file} and similar +constructs. For those cases, we recommend something along these lines: + +@lisp +(unattended-upgrade-configuration + (operating-system-file + (file-append (local-file "." "config-dir" #:recursive? #t) + "/config.scm"))) +@end lisp + +The effect here is to import all of the current directory into the +store, and to refer to @file{config.scm} within that directory. +Therefore, uses of @code{local-file} within @file{config.scm} will work +as expected. @xref{G-Expressions}, for information about +@code{local-file} and @code{file-append}. + @item @code{services-to-restart} (default: @code{'(mcron)}) This field specifies the Shepherd services to restart when the upgrade completes. |