marleyos/modules/home/programs/ssh/default.nix
punkfairie 15372b7726
feat: ${namespace} -> marleyos
There was little point to doing this anyway as project-wide find &
replace is trivial.
2024-11-16 22:36:34 -08:00

37 lines
699 B
Nix

{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.marleyos) mkEnableModule;
cfg = config.marleyos.programs.ssh;
in
{
options = mkEnableModule "programs.ssh";
config = 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";
};
};
};
};
}