summary refs log tree commit diff
path: root/etc/gnu-store.mount.in
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-05-14 15:13:12 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-05-17 15:16:52 +0200
commit301572aa87a9587465277d48325dd88fcbf1b312 (patch)
tree8e1137019fdfbfb94bc1eed174271691ebf103c4 /etc/gnu-store.mount.in
parent529dfb9ffcb5f0cba6cd22d5cd11c0d932c8c6d1 (diff)
downloadguix-301572aa87a9587465277d48325dd88fcbf1b312.tar.gz
etc: Add a systemd unit to bind-mount @storedir@ read-only.
* etc/gnu-store.mount.in: New file.
* nix/local.mk (nodist_systemdservice_DATA): Add it.
(etc/%.mount): New rule for it.
* etc/guix-install.sh (sys_enable_guix_daemon): Install it.
* doc/guix.texi (Binary Installation): Document it.
* .gitignore: Ignore changes to it.
Diffstat (limited to 'etc/gnu-store.mount.in')
-rw-r--r--etc/gnu-store.mount.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/gnu-store.mount.in b/etc/gnu-store.mount.in
new file mode 100644
index 0000000000..c94f2db72b
--- /dev/null
+++ b/etc/gnu-store.mount.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=Read-only @storedir@ for GNU Guix
+DefaultDependencies=no
+ConditionPathExists=@storedir@
+Before=guix-daemon.service
+
+[Install]
+WantedBy=guix-daemon.service
+
+[Mount]
+What=@storedir@
+Where=@storedir@
+Type=none
+Options=bind,ro