nix-config/modules/ssh/default.nix

67 lines
1.8 KiB
Nix

{ inputs, ... }:
{
flake.modules.nixos.ssh =
{ pkgs, ... }:
{
services.openssh.enable = true;
home-manager.sharedModules = [
inputs.self.modules.homeManager.ssh
];
};
flake.modules.darwin.ssh =
{ pkgs, ... }:
{
services.openssh.enable = true;
home-manager.sharedModules = [
inputs.self.modules.homeManager.ssh
];
};
flake.modules.homeManager.ssh =
{ pkgs, config, ... }:
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
addKeysToAgent = "yes";
};
"dnsc-machine" = {
hostname = "192.168.178.250";
user = "dennis";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
identitiesOnly = true;
};
"dnsc-server" = {
hostname = "192.168.178.69";
user = "dennis";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
identitiesOnly = true;
};
"dnsc-vps-sm" = {
hostname = "91.99.21.186";
user = "dennis";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
identitiesOnly = true;
};
"dnsc-storage" = {
hostname = "u295965.your-storagebox.de";
user = "u295965";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
identitiesOnly = true;
port = 23;
};
"dnsc-storage-sftp" = {
hostname = "u295965.your-storagebox.de";
user = "u295965";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
port = 22;
};
};
};
};
}