summary refs log tree commit diff
path: root/nix
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-16 15:37:41 +0200
commit1a1faa78b0498fbb71f1533beb4b65817c1d3f2a (patch)
tree26e517d245b551901679a6ca4e9fc6430f526b55 /nix
parent0fe654ebcdf3399a950da65b50924096c947df42 (diff)
downloadguix-1a1faa78b0498fbb71f1533beb4b65817c1d3f2a.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 'nix')
-rw-r--r--nix/local.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/nix/local.mk b/nix/local.mk
index a64bdd2137..435fdd389a 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -155,7 +155,17 @@ noinst_HEADERS =						\
 
 # The '.service' files for systemd.
 systemdservicedir = $(libdir)/systemd/system
-nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
+nodist_systemdservice_DATA =			\
+  etc/gnu-store.mount				\
+  etc/guix-daemon.service			\
+  etc/guix-publish.service
+
+etc/%.mount: etc/%.mount.in	\
+			 $(top_builddir)/config.status
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
+	$(SED) -e 's|@''storedir''@|$(storedir)|' <	\
+	       "$<" > "$@.tmp";		\
+	mv "$@.tmp" "$@"
 
 etc/guix-%.service: etc/guix-%.service.in	\
 			 $(top_builddir)/config.status