summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tw/deploy.scm28
-rw-r--r--tw/deploy/lud.scm5
-rw-r--r--tw/deploy/vin.scm5
3 files changed, 38 insertions, 0 deletions
diff --git a/tw/deploy.scm b/tw/deploy.scm
new file mode 100644
index 00000000..73e0045d
--- /dev/null
+++ b/tw/deploy.scm
@@ -0,0 +1,28 @@
+(define-module (tw deploy)
+ #:use-module (gnu machine)
+ #:use-module (gnu machine ssh)
+ #:use-module (gnu system)
+ #:use-module (tw system)
+ #:use-module (tw system lud)
+ #:use-module (tw system vin))
+
+(define-public %host-keys
+ '(("lud.twilken.net" . "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqXbxv3a2bZyGjnEirVCMtRBeLKW/ha8ULSR9Xye4Z1 root@(none)")
+ ("vin.twilken.net" . "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEEpdfKxzoCwg53TKPF5YxgUwhGF+bELAyBGdxagQroJ root@(none)")))
+
+(define-public (operating-system->machine system)
+ (machine
+ (operating-system system)
+ (environment managed-host-environment-type)
+ (configuration
+ (machine-ssh-configuration
+ (host-name (operating-system-host-name system))
+ (port (assoc-ref %ssh-ports host-name))
+ (host-key (assoc-ref %host-keys host-name))
+ (user "guixdeploy")
+ (identity "~/.local/share/ssh-keys/guixdeploy_id_ed25519")
+ (system "x86_64-linux")
+ (build-locally? #f)))))
+
+(map operating-system->machine
+ (list %lud-system %vin-system))
diff --git a/tw/deploy/lud.scm b/tw/deploy/lud.scm
new file mode 100644
index 00000000..c28f48ea
--- /dev/null
+++ b/tw/deploy/lud.scm
@@ -0,0 +1,5 @@
+(define-module (tw deploy lud)
+ #:use-module (tw deploy)
+ #:use-module (tw system lud))
+
+(list (operating-system->machine %lud-system))
diff --git a/tw/deploy/vin.scm b/tw/deploy/vin.scm
new file mode 100644
index 00000000..a6d07b34
--- /dev/null
+++ b/tw/deploy/vin.scm
@@ -0,0 +1,5 @@
+(define-module (tw deploy vin)
+ #:use-module (tw deploy)
+ #:use-module (tw system vin))
+
+(list (operating-system->machine %vin-system))