From ed94fcc5509f352c991da3d3621c310a63519f75 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 24 Feb 2024 23:26:20 +0300 Subject: [PATCH] Ssh : Move config to nix. --- .config/linux/system/flake.nix | 1 + .config/linux/system/module/common/Ssh.nix | 48 ++++++++++++++++++++++ .gitignore | 3 -- .ssh/config | 44 -------------------- 4 files changed, 49 insertions(+), 47 deletions(-) create mode 100644 .config/linux/system/module/common/Ssh.nix delete mode 100644 .ssh/config diff --git a/.config/linux/system/flake.nix b/.config/linux/system/flake.nix index f0b567a..14ddf88 100644 --- a/.config/linux/system/flake.nix +++ b/.config/linux/system/flake.nix @@ -31,6 +31,7 @@ ./module/common/Nvim.nix ./module/common/Package.nix ./module/common/Root.nix + ./module/common/Ssh.nix ./module/common/Sshd.nix ./module/common/Swap.nix ./module/common/Tmux.nix diff --git a/.config/linux/system/module/common/Ssh.nix b/.config/linux/system/module/common/Ssh.nix new file mode 100644 index 0000000..444146c --- /dev/null +++ b/.config/linux/system/module/common/Ssh.nix @@ -0,0 +1,48 @@ +{ ... }: { + programs.ssh.extraConfig = '' + Host dasha + HostName 192.168.1.7 + User root + Port 22143 + + Host desktop + Hostname 192.168.1.3 + User root + Port 22143 + + Host fmpmaven + Hostname 10.30.22.10 + User root + Port 22 + + Host fsight + Hostname 10.30.217.25 + User root + Port 22143 + + Host home + HostName 192.168.1.2 + User root + Port 22143 + + Host laptop + Hostname 192.168.1.9 + User root + Port 22143 + + Host pi + Hostname 192.168.1.6 + User root + Port 22143 + + Host vpn + Hostname 194.113.233.38 + User root + Port 22143 + + Host work + Hostname 192.168.1.5 + User root + Port 22143 + ''; +} diff --git a/.gitignore b/.gitignore index 90f03ae..9e0ca5c 100644 --- a/.gitignore +++ b/.gitignore @@ -101,9 +101,6 @@ !/.ssh/ /.ssh/** -# Ssh config. -!/.ssh/config - # Local configs. !/.local/ /.local/* diff --git a/.ssh/config b/.ssh/config deleted file mode 100644 index 603d958..0000000 --- a/.ssh/config +++ /dev/null @@ -1,44 +0,0 @@ -Host dasha - HostName 192.168.1.7 - User root - Port 22143 - -Host desktop - Hostname 192.168.1.3 - User root - Port 22143 - -Host fmpmaven - Hostname 10.30.22.10 - User root - Port 22 - -Host fsight - Hostname 10.30.217.25 - User root - Port 22143 - -Host home - HostName 192.168.1.2 - User root - Port 22143 - -Host laptop - Hostname 192.168.1.9 - User root - Port 22143 - -Host pi - Hostname 192.168.1.6 - User root - Port 22143 - -Host vpn - Hostname 194.113.233.38 - User root - Port 22143 - -Host work - Hostname 192.168.1.5 - User root - Port 22143