From 19eab9411ca1a2fd15c8c51f27b147ad0ee050d2 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 25 Aug 2022 17:12:56 +0200 Subject: [PATCH] ssh: Add all hostnames for storage box --- modules/ssh.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ssh.nix b/modules/ssh.nix index 08213c7..41f6b0d 100644 --- a/modules/ssh.nix +++ b/modules/ssh.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: { services.openssh = { enable = true; @@ -11,7 +11,10 @@ programs.ssh.knownHosts = { "[git.sbruder.de]:2022".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINV/2NbmkWuOs/RyULTex1MkLaKrrDJFj8piX2CR+ms/"; - "[personal.storagebox.sbruder.de]:23".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; + "[personal.storagebox.sbruder.de]:23" = { + hostNames = [ "[personal.storagebox.sbruder.de]:23" ] ++ map (id: "[u313368${lib.optionalString (id != 0) "-sub${toString id}"}.your-storagebox.de]:23") (lib.range 0 100); + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; + }; sayuri = { hostNames = [ "sayuri" "sayuri.home.sbruder.de" "sayuri.vpn.sbruder.de" ];