summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi5
-rw-r--r--gnu/services.scm5
-rw-r--r--gnu/system/file-systems.scm15
3 files changed, 20 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 78bc4ae02a0..811310fa956 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18228,6 +18228,11 @@ The daemon itself is still able to write to the store: it remounts it
18228read-write in its own ``name space.'' 18228read-write in its own ``name space.''
18229@end defvar 18229@end defvar
18230 18230
18231@defvar %runtime-variable-data
18232This file system is mounted as @file{/run} and contains system
18233information data describing the system since it was booted.
18234@end defvar
18235
18231@defvar %binary-format-file-system 18236@defvar %binary-format-file-system
18232The @code{binfmt_misc} file system, which allows handling of arbitrary 18237The @code{binfmt_misc} file system, which allows handling of arbitrary
18233executable file types to be delegated to user space. This requires the 18238executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e0724..ea855ad1937 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -632,7 +632,7 @@ information is missing, return the empty list (for channels) and possibly
632 #~(begin 632 #~(begin
633 (use-modules (guix build utils)) 633 (use-modules (guix build utils))
634 634
635 ;; Clean out /tmp, /var/run, and /run. 635 ;; Clean out /tmp and /var/run.
636 ;; 636 ;;
637 ;; XXX This needs to happen before service activations, so it 637 ;; XXX This needs to happen before service activations, so it
638 ;; has to be here, but this also implicitly assumes that /tmp 638 ;; has to be here, but this also implicitly assumes that /tmp
@@ -663,15 +663,12 @@ information is missing, return the empty list (for channels) and possibly
663 (setlocale LC_CTYPE "en_US.utf8") 663 (setlocale LC_CTYPE "en_US.utf8")
664 (delete-file-recursively "/tmp") 664 (delete-file-recursively "/tmp")
665 (delete-file-recursively "/var/run") 665 (delete-file-recursively "/var/run")
666 (delete-file-recursively "/run")
667 666
668 ;; Note: The second argument to 'mkdir' is and'ed with umask, 667 ;; Note: The second argument to 'mkdir' is and'ed with umask,
669 ;; hence the 'chmod' calls. 668 ;; hence the 'chmod' calls.
670 (mkdir "/tmp" #o1777) 669 (mkdir "/tmp" #o1777)
671 (chmod "/tmp" #o1777) 670 (chmod "/tmp" #o1777)
672 (mkdir "/var/run" #o755) 671 (mkdir "/var/run" #o755)
673 (chmod "/var/run" #o755)
674 (mkdir "/run" #o755)
675 (chmod "/var/run" #o755)))))) 672 (chmod "/var/run" #o755))))))
676 673
677(define cleanup-service-type 674(define cleanup-service-type
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70d..8c3898c9bfe 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -82,6 +82,7 @@
82 %pseudo-terminal-file-system 82 %pseudo-terminal-file-system
83 %tty-gid 83 %tty-gid
84 %immutable-store 84 %immutable-store
85 %runtime-variable-data
85 %control-groups 86 %control-groups
86 %elogind-file-systems 87 %elogind-file-systems
87 88
@@ -448,6 +449,17 @@ TARGET in the other system."
448 (check? #f) 449 (check? #f)
449 (flags '(read-only bind-mount no-atime)))) 450 (flags '(read-only bind-mount no-atime))))
450 451
452(define %runtime-variable-data
453 (file-system
454 (type "tmpfs")
455 (mount-point "/run")
456 (device "tmpfs")
457 (flags '(no-suid no-dev strict-atime))
458 (options "mode=0755,nr_inodes=800k,size=20%")
459 (needed-for-boot? #t)
460 (check? #f)
461 (create-mount-point? #t)))
462
451(define %control-groups 463(define %control-groups
452 ;; The cgroup2 file system. 464 ;; The cgroup2 file system.
453 (list (file-system 465 (list (file-system
@@ -497,7 +509,8 @@ TARGET in the other system."
497 %debug-file-system 509 %debug-file-system
498 %shared-memory-file-system 510 %shared-memory-file-system
499 %efivars-file-system 511 %efivars-file-system
500 %immutable-store)) 512 %immutable-store
513 %runtime-variable-data))
501 514
502(define %base-live-file-systems 515(define %base-live-file-systems
503 ;; This is the bare minimum to use live file-systems. 516 ;; This is the bare minimum to use live file-systems.