(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 (file-system-label "guix")) (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) (flags '(no-dev strict-atime)) (options (format #f "mode=0755,~ nr_inodes=800k,~ size=20%"))) #|tmp|# (file-system (device "none") (type "tmpfs") (mount-point "/tmp") (check? #f) (needed-for-boot? #f)) #|root|# (file-system (device "none") (type "tmpfs") (mount-point "/") (check? #f) (needed-for-boot? #t) (options "mode=0755")) #|gnu|# (file-system (device partition:guix) (type "btrfs") (mount-point "/gnu/persist") (needed-for-boot? #t) (flags '(no-atime)) (options (format #f "subvol=@gnu/persist,~ ssd"))) (file-system (device partition:guix) (type "btrfs") (mount-point "/gnu/store") (needed-for-boot? #t) (flags '(no-atime)) (options (format #f "compress=zstd,~ subvol=@gnu/store,~ ssd"))) #|var|# (file-system (device partition:guix) (type "btrfs") (mount-point "/var/guix") (needed-for-boot? #t) (flags '(no-atime)) (options (format #f "compress=zstd,~ subvol=@var/guix,~ ssd"))) (file-system (device partition:guix) (type "btrfs") (mount-point "/var/lib") (needed-for-boot? #t) (flags '(no-atime)) (options (format #f "compress=zstd,~ subvol=@var/lib,~ ssd"))) (file-system (device partition:guix) (type "btrfs") (mount-point "/var/log") (check? #f) (needed-for-boot? #t) (flags '(no-atime)) (options (format #f "compress=zstd,~ subvol=@var/log,~ ssd"))) (file-system (device "none") (type "tmpfs") (mount-point "/var/run") (check? #f) (needed-for-boot? #t) (flags '(no-dev strict-atime)) (options (format #f "mode=0755,~ nr_inodes=800k,~ size=20%"))) #|swap|# (file-system (device partition:guix) (type "btrfs") (mount-point "/swap") (check? #f) (needed-for-boot? #t) (options (format #f "subvol=@swap,~ discard=async,~ ssd"))) #|home|# (file-system (device partition:guix) (type "btrfs") (mount-point "/root") (flags '(no-atime)) (options (format #f "subvol=@root,~ discard=async,~ ssd"))) (file-system (device partition:guix) (type "btrfs") (mount-point "/home") (flags '(no-atime)) (options (format #f "subvol=@home,~ discard=async,~ ssd"))))) (define persistent-directories (map (lambda (filename) (file-system (mount-point filename) (device (string-append "/gnu/persist" mount-point)) (type "none") (check? #f) (flags '(no-atime bind-mount)))) `("/etc/guix" "/etc/ssh"))) (define persistent-files (list "/etc/machine-id" "/etc/wpa-supplicant.conf"))