zero/operating-systems/buer/file-systems.scm

135 lines
3.9 KiB
Scheme
Raw Normal View History

(define-module (buer file-systems)
#:use-module (gnu system file-systems)
2024-11-03 11:29:05 +00:00
#:export (partition:guix
persistent-directories
2024-11-03 04:43:37 +00:00
persistent-files
volumes))
2024-10-21 00:14:14 +00:00
;;; reminder: Send a patch to guix to make file-system-options and
;;; privileged-program-capabitilities receive a list-of-strings
2024-11-03 04:43:37 +00:00
(define partition:guix
2024-11-04 12:22:46 +00:00
(file-system-label "guix"))
2024-11-03 04:43:37 +00:00
(define volumes
(list #|base|#
2024-11-03 13:23:26 +00:00
%immutable-store
2024-11-03 04:43:37 +00:00
%pseudo-terminal-file-system
%shared-memory-file-system
2024-11-03 04:43:37 +00:00
#|boot|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/boot")
(check? #f)
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "subvol=@boot,~
discard=async,~
ssd")))
2024-11-03 21:22:27 +00:00
#|run|#
(file-system
(device "none")
(type "tmpfs")
(mount-point "/run")
(check? #f)
(needed-for-boot? #t)
(options "mode=0755"))
2024-11-03 04:43:37 +00:00
#|root|#
(file-system
(device "none")
(mount-point "/")
(check? #f)
(type "tmpfs")
(needed-for-boot? #t)
(options "mode=755"))
#|gnu|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/gnu/persist")
(needed-for-boot? #t)
(flags '(no-atime bind-mount))
(options (format #f "discard=async,~
ssd,~
subvol=@gnu/persist")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/gnu/store")
(needed-for-boot? #t)
2024-11-03 13:23:26 +00:00
(flags '(no-atime))
2024-11-03 04:43:37 +00:00
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@gnu/store")))
#|var|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/guix")
2024-11-03 21:22:27 +00:00
(needed-for-boot? #t)
2024-11-03 04:43:37 +00:00
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@var/guix")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/log")
2024-11-03 21:22:27 +00:00
(needed-for-boot? #t)
2024-11-03 04:43:37 +00:00
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@var/log")))
2024-11-03 21:22:27 +00:00
(file-system
(device "none")
(type "tmpfs")
(mount-point "/var/run")
(check? #f)
(needed-for-boot? #t)
(options "mode=0755"))
2024-11-03 04:43:37 +00:00
#|home|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/root")
(flags '(no-atime bind-mount))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@root")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/home")
(flags '(no-atime bind-mount))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@home")))))
(define persistent-directories
(map (lambda (filename)
(file-system
2024-11-03 04:43:37 +00:00
(mount-point filename)
(device (string-append "/gnu/persist" mount-point))
(type "none")
(flags '(no-atime bind-mount))))
`("/etc/guix"
"/etc/ssh"
"/etc/wireguard")))
(define persistent-files
(list "/etc/machine-id"
"/etc/wpa-supplicant.conf"))