nixos-config/home/ssh.nix

39 lines
740 B
Nix
Raw Normal View History

2021-07-29 11:31:21 +02:00
{ config, lib, ... }:
let
2022-01-11 16:08:21 +01:00
inherit (lib)
mkEnableOption
mkIf
;
2021-07-29 11:31:21 +02:00
cfg = config.my.home.ssh;
in
{
2022-01-11 16:08:21 +01:00
options.my.home.ssh = {
2021-07-29 11:31:21 +02:00
enable = (mkEnableOption "ssh configuration") // { default = true; };
};
2022-01-11 16:08:21 +01:00
config = mkIf cfg.enable {
2021-07-29 11:31:21 +02:00
programs.ssh = {
enable = true;
matchBlocks = {
2021-08-21 12:06:09 +02:00
boreal = { hostname = "boreal.alarsyo.net"; };
poseidon = { hostname = "poseidon.alarsyo.net"; };
pi = {
hostname = "pi.alarsyo.net";
user = "pi";
2021-07-29 11:31:21 +02:00
};
2021-08-01 13:33:21 +02:00
"*.lrde.epita.fr" = {
user = "amartin";
};
lrde-proxyjump = {
host = "*.lrde.epita.fr !ssh.lrde.epita.fr";
proxyJump = "ssh.lrde.epita.fr";
};
2021-07-29 11:31:21 +02:00
};
};
};
}