From 4a015ef50503b343a2413c77be5b7e22c6709f77 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 26 Sep 2023 18:51:17 +0200 Subject: [PATCH] add yodaNas --- assets/ssh/known_hosts | 9 +++++---- hive.nix | 13 +++++++++++++ hosts/yodaNas/configuration.nix | 2 +- modules/ssh-client.nix | 15 ++++++++++----- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/assets/ssh/known_hosts b/assets/ssh/known_hosts index 31875d1..caa3ae9 100644 --- a/assets/ssh/known_hosts +++ b/assets/ssh/known_hosts @@ -1,8 +1,9 @@ -# 2022-12 yodaNas with Arch Linux -#[p1st.de]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIASF7AJeGIkQG0erOJym8bHLBjRClkdPPCDNZAKOZ6S+ - # 2023-09 yodaNas with NixOS -192.168.178.27 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHalprb0uOHjvchbyU5dV/qpRqMs8tkQCGZ3O4K9+DMH +[192.168.178.27]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHalprb0uOHjvchbyU5dV/qpRqMs8tkQCGZ3O4K9+DMH +[p1st.de]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHalprb0uOHjvchbyU5dV/qpRqMs8tkQCGZ3O4K9+DMH +# 2023-09 yodaNas with NixOS SSH FDE unlcok +[192.168.178.27]:2223 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK0bfqbAh6E3sq82sg+ftcYLn7sPqCpPmPniL5Ey42Js +[p1st.de]:2223 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK0bfqbAh6E3sq82sg+ftcYLn7sPqCpPmPniL5Ey42Js # 2023-09 yodaTux NixOS early SSH FDE unlock [yodaTux.localhost]:22 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1QKkJg9ekAAxTADCXIvHylrYOc6EdEyKUmKaQhaW3e diff --git a/hive.nix b/hive.nix index 7ec070c..14c965c 100644 --- a/hive.nix +++ b/hive.nix @@ -71,4 +71,17 @@ in tags = [ "server" ]; }; }; + + yodaNas = { name, nodes, ... }: { + # Import the per-host configuration file. + imports = [ ./hosts/${name}/configuration.nix ]; + + deployment = { + # SSH deployment. + targetHost = "p1st.de"; + targetPort = 2222; + + tags = [ "server" ]; + }; + }; } diff --git a/hosts/yodaNas/configuration.nix b/hosts/yodaNas/configuration.nix index 5bc277e..b98691b 100644 --- a/hosts/yodaNas/configuration.nix +++ b/hosts/yodaNas/configuration.nix @@ -32,7 +32,7 @@ in #../../modules/wallpaper.nix #../../modules/fwupd-gnome.nix #../../modules/print-and-scan.nix - #../../modules/fde-ssh-unlock.nix + ../../modules/fde-ssh-unlock.nix #../../modules/nextcloud-integration.nix #../../modules/gnome-config.nix diff --git a/modules/ssh-client.nix b/modules/ssh-client.nix index ea9e49f..9b38893 100644 --- a/modules/ssh-client.nix +++ b/modules/ssh-client.nix @@ -15,23 +15,21 @@ compression = true; }; + # local IP: 192.168.178.99 "yodaYoga" = { hostname = "p1st.de"; - #hostname = "192.168.178.99"; user = "yoda"; port = 2224; compression = true; }; "rootYodaYoga" = { hostname = "p1st.de"; - #hostname = "192.168.178.99"; user = "root"; port = 2224; compression = true; }; "unlockYodaYoga" = { hostname = "p1st.de"; - #hostname = "192.168.178.99"; user = "root"; port = 2225; compression = true; @@ -65,18 +63,25 @@ compression = true; }; - "nas" = { + # local IP: 192.168.178.27 + "yodaNas" = { hostname = "p1st.de"; user = "yoda"; port = 2222; compression = true; }; - "rootNas" = { + "rootYodaNas" = { hostname = "p1st.de"; user = "root"; port = 2222; compression = true; }; + "unlockYodaNas" = { + hostname = "p1st.de"; + user = "root"; + port = 2223; + compression = true; + }; }; };