31 lines
650 B
Nix
31 lines
650 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.marleyos.programs.ssh;
|
|
in {
|
|
options.marleyos.programs.ssh.enable = lib.mkEnableOption "ssh";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.ssh = {
|
|
enable = true;
|
|
|
|
# Equivalent of ~/.ssh/config
|
|
# %d - local user's home directory
|
|
# %r - remote username
|
|
matchBlocks = {
|
|
"tty.marleycentre" = {
|
|
hostname = "10.10.10.69";
|
|
identityFile = "%d/.ssh/%r@marleycentre";
|
|
};
|
|
|
|
"tty.marleynet" = {
|
|
hostname = "10.69.69.2";
|
|
port = 222;
|
|
identityFile = "%d/.ssh/%r@marleynet";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|