summaryrefslogtreecommitdiffstats
path: root/src/jd/host.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/jd/host.scm')
-rw-r--r--src/jd/host.scm73
1 files changed, 46 insertions, 27 deletions
diff --git a/src/jd/host.scm b/src/jd/host.scm
index d94d0e2..1bd5c30 100644
--- a/src/jd/host.scm
+++ b/src/jd/host.scm
@@ -6,39 +6,58 @@
6 #:use-module (gnu system mapped-devices) 6 #:use-module (gnu system mapped-devices)
7 #:use-module (ice-9 match)) 7 #:use-module (ice-9 match))
8 8
9(define mapped-devices
10 (list (mapped-device
11 (source (uuid "3fcc2e44-77bb-4a62-bbdc-f8c646fccbd2"))
12 (target "enc")
13 (type luks-device-mapping))))
14
15(define btrfs-subvolumes
16 (map (match-lambda
17 ((subvol . mount-point)
18 (file-system
19 (type "btrfs")
20 (device "/dev/mapper/enc")
21 (mount-point mount-point)
22 (options (format #f "subvol=~a" subvol))
23 (dependencies mapped-devices))))
24 '((@ . "/")
25 (@boot . "/boot")
26 (@gnu . "/gnu")
27 (@nix . "/nix")
28 (@home . "/home")
29 (@data . "/data")
30 (@var-log . "/var/log"))))
31
32(define data-fs
33 (car
34 (filter
35 (lambda (x) (equal? (file-system-mount-point x) "/data"))
36 btrfs-subvolumes)))
37
38(define file-systems
39 (append
40 btrfs-subvolumes
41 (list
42 (file-system
43 (device "/data/system/var/lib")
44 (type "none")
45 (mount-point "/var/lib")
46 (flags '(bind-mount))
47 (dependencies (list data-fs)))
48 (file-system
49 (mount-point "/boot/efi")
50 (type "vfat")
51 (device (uuid "82F1-2D6E" 'fat32))))))
52
9(define-public %host-features 53(define-public %host-features
10 (list 54 (list
11 (feature-host-info 55 (feature-host-info
12 #:host-name "berserker" 56 #:host-name "berserker"
13 #:timezone "Europe/Warsaw") 57 #:timezone "Europe/Warsaw")
14 (feature-file-systems 58 (feature-file-systems
15 #:mapped-devices (list (mapped-device 59 #:mapped-devices mapped-devices
16 (source (uuid 60 #:file-systems file-systems)
17 "1f2b1bf2-89fe-4e2c-8b40-c460572bb776"))
18 (target "crypthome")
19 (type luks-device-mapping)))
20 #:file-systems (list
21 (file-system
22 (mount-point "/")
23 (device (uuid
24 "c895e61e-1a5e-470f-b7aa-a502fc0b8596"
25 'ext4))
26 (type "ext4"))
27 (file-system
28 (mount-point "/boot/efi")
29 (device (uuid "9669-0171"
30 'fat32))
31 (type "vfat"))
32 (file-system
33 (mount-point "/home")
34 (device "/dev/mapper/crypthome")
35 (type "ext4")
36 (dependencies
37 (list (mapped-device
38 (source (uuid
39 "1f2b1bf2-89fe-4e2c-8b40-c460572bb776"))
40 (target "crypthome")
41 (type luks-device-mapping)))))))
42 (feature-kanshi 61 (feature-kanshi
43 #:extra-config 62 #:extra-config
44 `((profile laptop ((output eDP-1 enable))) 63 `((profile laptop ((output eDP-1 enable)))