diff --git a/common/programms/bash.nix b/common/programms/bash.nix index 0e30ff4..11d8ac5 100644 --- a/common/programms/bash.nix +++ b/common/programms/bash.nix @@ -127,29 +127,30 @@ # a little programm, that changes the ssh config to always be able to acces rpi function rpi(){ + ssh_dir=~/.ssh if [ "$1" == "l" ] then - cp ~/work/config/ssh/rpi/local ~/work/config/ssh/current_pi_config + cp $ssh_dir/rpi/local $ssh_dir/current_rpi_config fi if [ "$1" == "local" ] then - cp ~/work/config/ssh/rpi/local ~/work/config/ssh/current_pi_config + cp $ssh_dir/rpi/local $ssh_dir/current_rpi_config fi if [ "$1" == "r" ] then - cp ~/work/config/ssh/rpi/remote ~/work/config/ssh/current_pi_config + cp $ssh_dir/rpi/remote $ssh_dir/current_rpi_config fi if [ "$1" == "remote" ] then - cp ~/work/config/ssh/rpi/remote ~/work/config/ssh/current_pi_config + cp $ssh_dir/rpi/remote $ssh_dir/current_rpi_config fi if [ "$1" == "w" ] then - cp ~/work/config/ssh/rpi/wstunnel ~/work/config/ssh/current_pi_config + cp $ssh_dir/rpi/wstunnel $ssh_dir/current_rpi_config fi } diff --git a/common/programms/ssh.nix b/common/programms/ssh.nix index d1c0958..3318963 100644 --- a/common/programms/ssh.nix +++ b/common/programms/ssh.nix @@ -3,44 +3,40 @@ home-manager.users.me.programs.ssh = { enable = true; includes = [ "./current_rpi_config" ]; - /* matchBlocks = { + "github.com" = { + hostname = "github.com"; + identityFile = "${secretsDir}/private-key-main"; + }; hpm = { - hostame = "192.168.1.56"; + hostname = "192.168.1.56"; user = "root"; }; servers = { hostname = "192.168.1.3"; user = "server"; - extraConfig = '' - AddKeysToAgent yes - ''; identityFile = "${secretsDir}/private-key-main"; }; server = { hostname = "192.168.1.3"; user = "admin"; - extraConfig = '' - AddKeysToAgent yes - ''; identityFile = "${secretsDir}/private-key-main"; }; ocia = { hostname = "140.238.212.229"; user = "root"; - identityFIle = "${secretsDir}/private-key-ocia"; + identityFile = "${secretsDir}/private-key-ocia"; }; ocib = { hostname = "140.238.211.43"; user = "root"; - identityFIle = "${secretsDir}/private-key-ocib"; + identityFile = "${secretsDir}/private-key-ocib"; }; }; - */ }; home-manager.users.me.home.file.".ssh/rpi/local".text = ''