aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2024-06-03 16:59:52 +0200
committerTimo Wilken2024-06-03 17:00:46 +0200
commitee4aa34988eb9ddc049d23cc0ee15dae03e98dfe (patch)
treee60bc609af7eda191d42543bf9fc570e7f23912e
parent401ce81a597c7dd349a842a06c1696e6d63aa09d (diff)
Don't offload from work machine
-rw-r--r--tw/system.scm58
1 files changed, 30 insertions, 28 deletions
diff --git a/tw/system.scm b/tw/system.scm
index eb5bc914..4526e2d4 100644
--- a/tw/system.scm
+++ b/tw/system.scm
@@ -335,34 +335,36 @@ ACTION!=\"remove\", SUBSYSTEM==\"leds\", GROUP=\"video\", MODE=\"0664\"
;; selection of build machines as is done here.
(extra-special-file "/etc/guix/machines.scm"
(scheme-file "machines.scm"
- #~(let ((lud (build-machine
- (name "lud.twilken.net")
- (systems '("x86_64-linux"))
- (port '#$(assoc-ref %ssh-ports "lud.twilken.net"))
- (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqXbxv3a2bZyGjnEirVCMtRBeLKW/ha8ULSR9Xye4Z1")
- (user "timo")
- (private-key "/home/timo/.local/share/ssh-keys/id_ed25519")
- (speed '#$(/ 4 cores)))) ; 4 cores, 16 GB RAM
- (vin (build-machine
- (name "vin.twilken.net")
- (systems '("x86_64-linux"))
- (port '#$(assoc-ref %ssh-ports "vin.twilken.net"))
- (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEpdfKxzoCwg53TKPF5YxgUwhGF+bELAyBGdxagQroJ")
- (user "timo")
- (private-key "/home/timo/.local/share/ssh-keys/id_ed25519")
- (speed '#$(/ 8 cores))))) ; 8 cores, 16 GB RAM
- (use-modules (ice-9 popen)
- (ice-9 textual-ports)
- (ice-9 regex))
- (let* ((regexp (make-regexp "^GENERAL\\.CONNECTION:[[:space:]]+TLAN$" regexp/newline))
- (pipe (open-pipe* OPEN_READ #$(file-append network-manager "/bin/nmcli")
- "device" "show" #$wireless-interface))
- (at-home? (regexp-exec regexp (get-string-all pipe))))
- (close-pipe pipe)
- ;; Only offload to vin when at home, as the network connection is too bad otherwise.
- (if at-home?
- (list vin)
- (list lud))))))
+ (if work-system?
+ #~'() ; work machine doesn't have the required SSH keys for lud or vin
+ #~(let ((lud (build-machine
+ (name "lud.twilken.net")
+ (systems '("x86_64-linux"))
+ (port '#$(assoc-ref %ssh-ports "lud.twilken.net"))
+ (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqXbxv3a2bZyGjnEirVCMtRBeLKW/ha8ULSR9Xye4Z1")
+ (user "timo")
+ (private-key "/home/timo/.local/share/ssh-keys/id_ed25519")
+ (speed '#$(/ 4 cores)))) ; 4 cores, 16 GB RAM
+ (vin (build-machine
+ (name "vin.twilken.net")
+ (systems '("x86_64-linux"))
+ (port '#$(assoc-ref %ssh-ports "vin.twilken.net"))
+ (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEpdfKxzoCwg53TKPF5YxgUwhGF+bELAyBGdxagQroJ")
+ (user "timo")
+ (private-key "/home/timo/.local/share/ssh-keys/id_ed25519")
+ (speed '#$(/ 8 cores))))) ; 8 cores, 16 GB RAM
+ (use-modules (ice-9 popen)
+ (ice-9 textual-ports)
+ (ice-9 regex))
+ (let* ((regexp (make-regexp "^GENERAL\\.CONNECTION:[[:space:]]+TLAN$" regexp/newline))
+ (pipe (open-pipe* OPEN_READ #$(file-append network-manager "/bin/nmcli")
+ "device" "show" #$wireless-interface))
+ (at-home? (regexp-exec regexp (get-string-all pipe))))
+ (close-pipe pipe)
+ ;; Only offload to vin when at home, as the network connection is too bad otherwise.
+ (if at-home?
+ (list vin)
+ (list lud)))))))
(simple-service 'disk-maintenance mcron-service-type
;; I don't think jobs run on boot if they would have run when the