nixos/home/modules/ssh.nix

34 lines
790 B
Nix

{ lib, config, ... }:
let
cfg = config.snowhawk.ssh;
in
{
options.snowhawk.ssh = {
enable = lib.mkEnableOption "ssh";
};
config = lib.mkIf cfg.enable {
programs.ssh = {
enable = true;
matchBlocks = {
"git.zynh.me" = {
hostname = "git.zynh.me";
user = "git";
port = 2221;
identityFile = "${config.home.homeDirectory}/.ssh/personal_git";
};
msiserver = {
hostname = "scarlet.zynh.me";
user = "zynh";
identityFile = "${config.home.homeDirectory}/.ssh/msiserver";
};
"msiserver.local" = {
hostname = "msiserver";
user = "zynh";
identityFile = "${config.home.homeDirectory}/.ssh/msiserver";
};
};
};
};
}