From 4c7fd4f88af0c899431474fb4646aeb012874581 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Sun, 24 Mar 2024 20:17:24 +0100 Subject: [PATCH] [ssh] migrated to nix config --- apps/ssh/config | 22 ---------------------- nix/home/ssh/ssh.nix | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 apps/ssh/config diff --git a/apps/ssh/config b/apps/ssh/config deleted file mode 100644 index 0d2955f..0000000 --- a/apps/ssh/config +++ /dev/null @@ -1,22 +0,0 @@ -# generic -host * - user simon - identityfile ~/.ssh/talathiel - serveraliveinterval 60 - stricthostkeychecking no - - -# siempie lab -host *.siempie.local - proxyjump siempie.com - -host *.siempie.internal - proxyjump siempie.com - -host *.hackerboys.internal - proxyjump siempie.com - - -# siempie do -host *.do.local - proxyjump do.siempie.com diff --git a/nix/home/ssh/ssh.nix b/nix/home/ssh/ssh.nix index 42c3033..7425635 100644 --- a/nix/home/ssh/ssh.nix +++ b/nix/home/ssh/ssh.nix @@ -4,6 +4,20 @@ # ssh programs.ssh = { enable = true; - includes = [ "${config.home.homeDirectory}/.dotfiles/apps/ssh/config" ]; + matchBlocks = { + + # general + "*" = { + user = "simon"; + identityFile = "${config.home.homeDirectory}/.ssh/talathiel"; + serverAliveInterval = 60; + }; + + # siempie lab + "*.do.local" = { proxyJump = "siempie.com"; }; + "*.hackerboys.internal" = { proxyJump = "siempie.com"; }; + "*.siempie.internal" = { proxyJump = "siempie.com"; }; + "*.siempie.local" = { proxyJump = "siempie.com"; }; + }; }; }