mirror of https://codeberg.org/anemofilia/zero
limao
parent
add1a187ac
commit
3c6d2b913a
|
@ -106,28 +106,14 @@
|
|||
(bootloader
|
||||
(bootloader-configuration
|
||||
(bootloader grub-bootloader)
|
||||
(targets `("/dev/sda"))
|
||||
(theme (grub-theme
|
||||
(color-normal
|
||||
'((fg . light-gray) (bg . black)))
|
||||
(color-highlight
|
||||
'((fg . black) (bg . light-gray)))
|
||||
(image (file-append %artwork-repository
|
||||
"/backgrounds/guix-silver-16-9.svg"))
|
||||
(gfxmode `("1280x720x32"))))))
|
||||
(targets `("/dev/sda"))))
|
||||
|
||||
(kernel linux-libre-6.11)
|
||||
(kernel-arguments
|
||||
(cons* "modprobe.blacklist=usbmouse,usbkbd,pcspkr"
|
||||
"thinkpad_acpi.fan_control=1"
|
||||
(filter (negate ((on disjoin
|
||||
(partial partial string-prefix?))
|
||||
"debugfs" "l1tf" "mds" "mitigations" "nosmt"))
|
||||
%kicksecure-kernel-arguments)))
|
||||
(cons* "thinkpad_acpi.fan_control=1"
|
||||
%default-kernel-arguments))
|
||||
|
||||
(file-systems
|
||||
(append file-system:volumes
|
||||
file-system:persistent-directories))
|
||||
(append %tmpfs-file-systems))
|
||||
|
||||
(users
|
||||
(cons* user:radio
|
||||
|
@ -176,12 +162,12 @@
|
|||
(service seatd-service-type)
|
||||
(service greetd-service-type
|
||||
(greetd-configuration
|
||||
(greeter-supplementary-groups `("seat"))
|
||||
(greeter-supplementary-groups `("seat" "video"))
|
||||
(terminals
|
||||
(map (lambda (x)
|
||||
(greetd-terminal-configuration
|
||||
(terminal-vt (number->string x))
|
||||
(terminal-switch (= x 1))
|
||||
(terminal-switch #t)
|
||||
(default-session-command
|
||||
(greetd-agreety-session
|
||||
(command #~(getenv "SHELL"))))))
|
||||
|
@ -304,11 +290,6 @@
|
|||
(service special-files-service-type
|
||||
`(("/bin/sh" ,(file-append bash "/bin/bash"))
|
||||
("/usr/bin/env" ,(file-append coreutils "/bin/env"))))
|
||||
(simple-service 'persistent-files-service
|
||||
special-files-service-type
|
||||
(map (juxt identity
|
||||
(partial string-append "/gnu/persist/"))
|
||||
file-system:persistent-files))
|
||||
|
||||
#|Sysctl services|#
|
||||
(simple-service 'extra-sysctl-settings sysctl-service-type
|
||||
|
|
|
@ -1,134 +1,153 @@
|
|||
(define-module (buer file-systems)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:export (%tmpfs-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
|
||||
(define guix-part
|
||||
(file-system-label "guix"))
|
||||
|
||||
(define volumes
|
||||
(list #|base|#
|
||||
%immutable-store
|
||||
%pseudo-terminal-file-system
|
||||
%shared-memory-file-system
|
||||
(define root
|
||||
(file-system
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(mount-point "/")
|
||||
(check? #f)
|
||||
(needed-for-boot? #t)
|
||||
(options "mode=0755")))
|
||||
|
||||
#|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")))
|
||||
(define home
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/home")
|
||||
(flags '(no-atime))
|
||||
(options "subvol=@home,discard=async,ssd")))
|
||||
|
||||
#|run|#
|
||||
(file-system
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(mount-point "/run")
|
||||
(check? #f)
|
||||
(needed-for-boot? #t)
|
||||
(options "mode=0755"))
|
||||
(define root-user
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/root")
|
||||
(flags '(no-atime))
|
||||
(options "subvol=@root,discard=async,ssd")))
|
||||
|
||||
#|root|#
|
||||
(file-system
|
||||
(device "none")
|
||||
(mount-point "/")
|
||||
(check? #f)
|
||||
(type "tmpfs")
|
||||
(needed-for-boot? #t)
|
||||
(options "mode=755"))
|
||||
(define boot
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/boot")
|
||||
(check? #f)
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "subvol=@boot,discard=async,ssd")))
|
||||
|
||||
#|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")))
|
||||
(define tmp
|
||||
(file-system
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(mount-point "/tmp")
|
||||
(check? #f)
|
||||
(needed-for-boot? #f)))
|
||||
|
||||
#|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"))
|
||||
(define run
|
||||
(file-system
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(mount-point "/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 var-run
|
||||
(file-system
|
||||
(device "none")
|
||||
(type "tmpfs")
|
||||
(mount-point "/var/run")
|
||||
(check? #f)
|
||||
(needed-for-boot? #t)
|
||||
(options "mode=0755")))
|
||||
|
||||
(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 var-log
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/var/log")
|
||||
(check? #f)
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "compress=zstd,subvol=@var/log,ssd")))
|
||||
|
||||
(define persistent-files
|
||||
(list "/etc/machine-id"
|
||||
"/etc/wpa-supplicant.conf"))
|
||||
(define var-lib
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/var/lib")
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "compress=zstd,subvol=@var/lib,ssd")))
|
||||
|
||||
(define var-guix
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/var/guix")
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "compress=zstd,subvol=@var/guix,ssd")))
|
||||
|
||||
(define gnu-store
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/gnu/store")
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "compress=zstd,subvol=@gnu/store,ssd")))
|
||||
|
||||
(define gnu-persist
|
||||
(file-system
|
||||
(device guix-part)
|
||||
(type "btrfs")
|
||||
(mount-point "/gnu/persist")
|
||||
(needed-for-boot? #t)
|
||||
(flags '(no-atime))
|
||||
(options "subvol=@gnu/persist,ssd")))
|
||||
|
||||
(define gnu-persist-ssh
|
||||
(file-system
|
||||
(device "/gnu/persist/etc/ssh")
|
||||
(type "none")
|
||||
(mount-point "/etc/ssh")
|
||||
(flags '(no-atime bind-mount))))
|
||||
|
||||
(define gnu-persist-guix
|
||||
(file-system
|
||||
(device "/gnu/persist/etc/guix")
|
||||
(type "none")
|
||||
(mount-point "/etc/guix")
|
||||
(flags '(no-atime bind-mount))))
|
||||
|
||||
(define gnu-persist-wireguard
|
||||
(file-system
|
||||
(device "/gnu/persist/etc/wireguard")
|
||||
(type "none")
|
||||
(mount-point "/etc/wireguard")
|
||||
(flags '(no-atime bind-mount))))
|
||||
|
||||
(define %tmpfs-file-systems
|
||||
(cons* root
|
||||
home
|
||||
root-user
|
||||
boot
|
||||
tmp
|
||||
run
|
||||
var-run
|
||||
var-log
|
||||
var-lib
|
||||
var-guix
|
||||
gnu-store
|
||||
gnu-persist
|
||||
gnu-persist-ssh
|
||||
gnu-persist-guix
|
||||
gnu-persist-wireguard
|
||||
(delete %debug-file-system
|
||||
%base-file-systems)))
|
||||
|
|
Loading…
Reference in New Issue