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

135 lines
3.9 KiB
Scheme

(define-module (buer file-systems)
#:use-module (gnu system file-systems)
#:export (partition:guix
persistent-directories
persistent-files
volumes))
;;; reminder: Send a patch to guix to make file-system-options and
;;; privileged-program-capabitilities receive a list-of-strings
(define partition:guix
(uuid "511993de-4ee0-445f-9bd6-b6625941102b"))
(define volumes
(list #|base|#
%immutable-store
%pseudo-terminal-file-system
%shared-memory-file-system
#|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")))
#|run|#
(file-system
(device "none")
(type "tmpfs")
(mount-point "/run")
(check? #f)
(needed-for-boot? #t)
(options "mode=0755"))
#|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)
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@gnu/store")))
#|var|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/guix")
(needed-for-boot? #t)
(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")
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@var/log")))
(file-system
(device "none")
(type "tmpfs")
(mount-point "/var/run")
(check? #f)
(needed-for-boot? #t)
(options "mode=0755"))
#|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
(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"))