feat(home): SSH

This commit is contained in:
punkfairie 2024-11-16 19:43:34 -08:00
parent 1e629226db
commit 0f9830d027
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 38 additions and 22 deletions

View file

@ -38,6 +38,7 @@ in
neo = enabled;
rbw = enabled;
ripgrep = enabled;
ssh = enabled;
systemctl = enabled;
};
xorg = {

View file

@ -0,0 +1,37 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.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";
};
};
};
};
}

View file

@ -1,22 +0,0 @@
{ ... }:
{
programs.ssh = {
enable = true;
# Equivalent of ~/.ssh/config
# %d - local user's home directory
# %r - remote username
matchBlocks = {
"tty.marleycentre" = {
hostname = "admin.punkfairie.net";
identityFile = "%d/.ssh/%r@marleycentre";
};
"tty.marleynet" = {
hostname = "10.69.69.2";
port = 222;
identityFile = "%d/.ssh/%r@marleynet";
};
};
};
}