diff options
author | Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> | 2020-05-14 15:48:46 +0200 |
---|---|---|
committer | Guix Patches Tester <> | 2020-05-14 14:51:17 +0100 |
commit | 0b66caa4bb65849cebb30247577c92d156c92e21 (patch) | |
tree | f5131d3e3e7b0c86d94eaa41b5cbcfcc56554558 /etc/guix-install.sh | |
parent | 85eed078ff7b8a7a9f648f7cd72dfac8851609bc (diff) | |
download | patches-series-3956.tar patches-series-3956.tar.gz |
etc: Add a systemd unit to bind-mount @storedir@ read-only.series-3956
* etc/gnu-store.mount.in: New file.
* nix/local.mk (nodist_systemdservice_DATA): Add it.
(etc/%.mount): New rule.
* etc/guix-install.sh (sys_enable_guix_daemon): Install it.
* doc/guix.texi (Binary Installation): Document it.
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-x | etc/guix-install.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 4909d3f162..d252c132fb 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -342,7 +342,13 @@ sys_enable_guix_daemon() _msg "${PAS}enabled Guix daemon via upstart" ;; systemd) - { cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \ + { # systemd .mount units must be named after the target directory. + # Here we assume a hard-coded name of /gnu/store. + cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/gnu-store.mount" \ + /etc/systemd/system/; + chmod 664 /etc/systemd/system/gnu-store.mount; + + cp "${ROOT_HOME}/.config/guix/current/lib/systemd/system/guix-daemon.service" \ /etc/systemd/system/; chmod 664 /etc/systemd/system/guix-daemon.service; @@ -357,8 +363,8 @@ sys_enable_guix_daemon() fi; systemctl daemon-reload && - systemctl start guix-daemon && - systemctl enable guix-daemon; } && + systemctl start gnu-store.mount guix-daemon && + systemctl enable gnu-store.mount guix-daemon; } && _msg "${PAS}enabled Guix daemon via systemd" ;; sysv-init) |