From c67d17556f6c15bccdba0238c332d8ed78e12ee0 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Mon, 13 Apr 2026 21:17:29 +0200 Subject: [PATCH] updated ssh config --- flake.nix | 59 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/flake.nix b/flake.nix index 83ccf6b..4afdada 100644 --- a/flake.nix +++ b/flake.nix @@ -560,34 +560,39 @@ ssh = { enable = true; enableDefaultConfig = false; - matchBlocks = { - "*" = { - forwardAgent = false; - addKeysToAgent = "no"; - compression = false; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = false; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; + matchBlocks = + let + server = { + ip = "93.94.24.17"; + port = 22; + username = "dario48"; + }; + in + { + "*" = { + forwardAgent = false; + addKeysToAgent = "no"; + compression = false; + serverAliveInterval = 0; + serverAliveCountMax = 3; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = "no"; + }; + "git.dario48.site" = { + hostname = server.ip; + identityFile = "~/.ssh/id_ed25519"; + port = server.port; + }; + home_server = { + hostname = server.ip; + identityFile = "~/.ssh/home_server"; + user = server.username; + port = server.port; + }; }; - "dario48.site" = { - hostname = "93.94.24.17"; - }; - "git.dario48.site" = { - hostname = "dario48.site"; - identityFile = "~/.ssh/id_ed25519"; - port = 22; - }; - home_server = { - hostname = "dario48.site"; - identityFile = "~/.ssh/home_server"; - user = "dario48"; - port = 22; - }; - }; }; # }}} # hyfetch {{{