From be000686f7535d6064d84c3e98aa63c79a5295de Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 21 Sep 2023 13:40:08 +0200 Subject: [PATCH] ssh config and deployment --- README.md | 7 +++++-- hive.nix | 15 ++++++++++++++- modules/ssh-client.nix | 7 +++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b49414a..d5522be 100644 --- a/README.md +++ b/README.md @@ -195,8 +195,11 @@ colmena build Apply to all non-local nodes: ```shell -colmena apply switch -#colmena apply boot +colmena apply --on @server switch +#colmena apply --on @server boot + +#colmena apply --on @yodaTab switch +#colmena apply --on @yodaTab boot ``` Apply to local node: diff --git a/hive.nix b/hive.nix index 26f0946..7ec070c 100644 --- a/hive.nix +++ b/hive.nix @@ -46,6 +46,19 @@ in # SSH DEPLOYMENT # + remoteYodaTab = { name, nodes, ... }: { + # Import the per-host configuration file. + imports = [ ./hosts/yodaTab/configuration.nix ]; + + deployment = { + # SSH deployment. + targetHost = "192.168.178.33"; + targetPort = 22; + + tags = [ "yodaTab" ]; + }; + }; + yodaYoga = { name, nodes, ... }: { # Import the per-host configuration file. imports = [ ./hosts/${name}/configuration.nix ]; @@ -55,7 +68,7 @@ in targetHost = "p1st.de"; targetPort = 2224; - # tags = [ "production" ]; + tags = [ "server" ]; }; }; } diff --git a/modules/ssh-client.nix b/modules/ssh-client.nix index 59f68ab..ea9e49f 100644 --- a/modules/ssh-client.nix +++ b/modules/ssh-client.nix @@ -8,6 +8,13 @@ enable = true; userKnownHostsFile = "~/.ssh/known_hosts ${../assets/ssh/known_hosts}"; matchBlocks = { + "yodaTab" = { + hostname = "192.168.178.33"; + user = "yoda"; + port = 22; + compression = true; + }; + "yodaYoga" = { hostname = "p1st.de"; #hostname = "192.168.178.99";