about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCollin J. Doering2024-12-19 23:17:21 -0500
committerCollin J. Doering2024-12-19 23:17:21 -0500
commitfe9d6bc6077cd80fb907f6373271526a844d5654 (patch)
treed5352bd9613b9e4bf2b91f703624e3f5f9bf1f58
parenteaf9f4f9dcaaf2db04cbcaf4be4b39a6a9fa2cc7 (diff)
downloadguix-north-america-fe9d6bc6077cd80fb907f6373271526a844d5654.tar.gz
balg02: Move guix-publish cache onto raid1 storage
* .guix/guix-na/config/balg02.scm: Adjust balg02 function to use #:key for arguments (to
improve human readability at call sites).
(balg02): Add mapped-devices field and additional file-system to returned operating system to
enable support for the mdadm raid1 that has been setup manually. Adjust guix-publish cache
to use /var/data/.
-rw-r--r--.guix/guix-na/config/balg02.scm25
1 files changed, 21 insertions, 4 deletions
diff --git a/.guix/guix-na/config/balg02.scm b/.guix/guix-na/config/balg02.scm
index e222ece..e3741c8 100644
--- a/.guix/guix-na/config/balg02.scm
+++ b/.guix/guix-na/config/balg02.scm
@@ -478,7 +478,7 @@ synonymous IETF language tags that should be mapped to the same $lang."
                         "--gc-keep-derivations"))
    (tmpdir "/var/tmp")))
 
-(define (balg02 efi-boot-uuid)
+(define* (balg02 #:key efi-boot-uuid raid1-data-uuid data-raid-members)
   (operating-system
    (host-name "balg02")
    (timezone "US/Central")
@@ -499,6 +499,13 @@ synonymous IETF language tags that should be mapped to the same $lang."
                 (serial-speed 115200)
                 (targets '("/boot/efi"))))
 
+   (mapped-devices
+    (list
+     (mapped-device
+      (source data-raid-members)
+      (target "/dev/md0")
+      (type raid-device-mapping))))
+
    (file-systems (append
                   (list (file-system
                          (device (file-system-label "root"))
@@ -518,7 +525,13 @@ synonymous IETF language tags that should be mapped to the same $lang."
                          (device "none")
                          (mount-point "/tmp")
                          (type "tmpfs")
-                         (check? #f)))
+                         (check? #f))
+                        (file-system
+                         (device (uuid raid1-data-uuid))
+                         (mount-point "/var/data")
+                         (create-mount-point? #t)
+                         (type "ext4")
+                         (dependencies mapped-devices)))
                   %base-file-systems))
 
    (swap-devices
@@ -565,6 +578,7 @@ synonymous IETF language tags that should be mapped to the same $lang."
     (append
      (map specification->package
           '("btrfs-progs"
+            "mdadm"
             "recutils"
             "openssh"
             "tmux"
@@ -624,7 +638,7 @@ synonymous IETF language tags that should be mapped to the same $lang."
       (service guix-publish-service-type
                (guix-publish-configuration
                 (port 3000)
-                (cache "/var/cache/guix/publish")
+                (cache "/var/data/guix-publish-cache/")
                 (ttl (* 90 24 3600)))))
       (modify-services %base-services
         (guix-service-type config => (guix-daemon-config
@@ -638,4 +652,7 @@ synonymous IETF language tags that should be mapped to the same $lang."
                                        %default-authorized-guix-keys)
                                       #:build-accounts-to-max-jobs-ratio 5)))))))
 
-(define %system (balg02 "3AF8-9E67"))
+(define %system (balg02
+                 #:efi-boot-uuid "3AF8-9E67"
+                 #:raid1-data-uuid "fdc495ca-6ac6-4a50-9115-8f5e2cc2851f"
+                 #:data-raid-members (list "/dev/sdc1" "/dev/sdd1")))