feat(home): SSH
This commit is contained in:
parent
1e629226db
commit
0f9830d027
3 changed files with 38 additions and 22 deletions
|
@ -38,6 +38,7 @@ in
|
|||
neo = enabled;
|
||||
rbw = enabled;
|
||||
ripgrep = enabled;
|
||||
ssh = enabled;
|
||||
systemctl = enabled;
|
||||
};
|
||||
xorg = {
|
||||
|
|
37
modules/home/programs/ssh/default.nix
Normal file
37
modules/home/programs/ssh/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue