ssh updates
This commit is contained in:
+42
-50
@@ -126,98 +126,90 @@ in
|
||||
SetEnv TERM="xterm-256color"
|
||||
'';
|
||||
|
||||
matchBlocks = lib.mkMerge [
|
||||
settings = lib.mkMerge [
|
||||
{
|
||||
"john-pc-ubuntu" = {
|
||||
hostname = "192.168.1.85";
|
||||
HostName = "192.168.1.85";
|
||||
};
|
||||
|
||||
"*" = lib.mkMerge [
|
||||
{
|
||||
user = "john";
|
||||
identityAgent = "${config.home.homeDirectory}/.1password/agent.sock";
|
||||
User = "john";
|
||||
IdentityAgent = "${config.home.homeDirectory}/.1password/agent.sock";
|
||||
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
Compression = false;
|
||||
ServerAliveInterval = 0;
|
||||
ServerAliveCountMax = 3;
|
||||
|
||||
identitiesOnly = true;
|
||||
inherit identityFile;
|
||||
IdentitiesOnly = true;
|
||||
IdentityFile = identityFile;
|
||||
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = cfg.knownHostsFile;
|
||||
HashKnownHosts = false;
|
||||
UserKnownHostsFile = cfg.knownHostsFile;
|
||||
|
||||
addKeysToAgent = "yes";
|
||||
forwardAgent = false;
|
||||
AddKeysToAgent = "yes";
|
||||
ForwardAgent = false;
|
||||
}
|
||||
(lib.mkIf cfg.certificates.enable { inherit certificateFile; })
|
||||
(lib.mkIf cfg.certificates.enable { CertificateFile = certificateFile; })
|
||||
];
|
||||
}
|
||||
(lib.mkIf cfg.matchSets.appdaemon {
|
||||
"appdaemon" = {
|
||||
hostname = "192.168.1.242";
|
||||
user = "appdaemon";
|
||||
HostName = "192.168.1.242";
|
||||
User = "appdaemon";
|
||||
};
|
||||
"ad-nix" = {
|
||||
hostname = "192.168.1.201";
|
||||
user = "appdaemon";
|
||||
HostName = "192.168.1.201";
|
||||
User = "appdaemon";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.matchSets.certs {
|
||||
"janus" = {
|
||||
hostname = "janus.john-stream.com";
|
||||
user = "root";
|
||||
HostName = "janus.john-stream.com";
|
||||
User = "root";
|
||||
};
|
||||
"soteria" = {
|
||||
hostname = "soteria.john-stream.com";
|
||||
user = "john";
|
||||
HostName = "soteria.john-stream.com";
|
||||
User = "john";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.matchSets.homelab {
|
||||
"docs" = {
|
||||
hostname = "192.168.1.110";
|
||||
user = "root";
|
||||
extraOptions = {
|
||||
RequestTTY = "force";
|
||||
RemoteCommand = "~/.nix-profile/bin/jsl-zsh";
|
||||
};
|
||||
HostName = "192.168.1.110";
|
||||
User = "root";
|
||||
RequestTTY = "force";
|
||||
RemoteCommand = "~/.nix-profile/bin/jsl-zsh";
|
||||
};
|
||||
"gitea" = {
|
||||
hostname = "192.168.1.104";
|
||||
user = "john";
|
||||
HostName = "192.168.1.104";
|
||||
User = "john";
|
||||
};
|
||||
"hermes" = {
|
||||
hostname = "192.168.1.150";
|
||||
user = "root";
|
||||
HostName = "192.168.1.150";
|
||||
User = "root";
|
||||
# Enabling this breaks the ability of Zed to install its remote stuff
|
||||
# extraOptions = {
|
||||
# RequestTTY = "force";
|
||||
# RemoteCommand = "/root/.nix-profile/bin/jsl-zsh";
|
||||
# };
|
||||
# RequestTTY = "force";
|
||||
# RemoteCommand = "/root/.nix-profile/bin/jsl-zsh";
|
||||
};
|
||||
"panoptes" = {
|
||||
hostname = "192.168.1.107";
|
||||
user = "panoptes";
|
||||
HostName = "192.168.1.107";
|
||||
User = "panoptes";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.matchSets.dev {
|
||||
"test-nix" = {
|
||||
hostname = "fded:fb16:653e:25da:be24:11ff:fea0:753f";
|
||||
user = "john";
|
||||
extraOptions = {
|
||||
RequestTTY = "auto";
|
||||
# RemoteCommand = "/run/current-system/sw/bin/jsl-zsh";
|
||||
};
|
||||
HostName = "fded:fb16:653e:25da:be24:11ff:fea0:753f";
|
||||
User = "john";
|
||||
RequestTTY = "auto";
|
||||
# RemoteCommand = "/run/current-system/sw/bin/jsl-zsh";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.matchSets.tailscale {
|
||||
"jdl-docker" = {
|
||||
hostname = "jdl-docker.tailcf205.ts.net";
|
||||
user = "john";
|
||||
extraOptions = {
|
||||
RequestTTY = "auto";
|
||||
# RemoteCommand = "~/.nix-profile/bin/jsl-zsh";
|
||||
};
|
||||
HostName = "jdl-docker.tailcf205.ts.net";
|
||||
User = "john";
|
||||
RequestTTY = "auto";
|
||||
# RemoteCommand = "~/.nix-profile/bin/jsl-zsh";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user