ssh: Enable ControlMaster for hass
This commit is contained in:
parent
d2f4471b42
commit
d2bbea44ab
1 changed files with 14 additions and 11 deletions
|
@ -1,15 +1,15 @@
|
||||||
{ config
|
{ config, lib, ... }:
|
||||||
, lib
|
with lib;
|
||||||
, ...
|
let
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.eboskma.programs.ssh;
|
cfg = config.eboskma.programs.ssh;
|
||||||
var = config.eboskma.var;
|
var = config.eboskma.var;
|
||||||
personalKey = "~/.ssh/id_ed25519_sk_personal.pub";
|
personalKey = "~/.ssh/id_ed25519_sk_personal.pub";
|
||||||
horusKey = "~/.ssh/id_ed25519_sk_horus.pub";
|
horusKey = "~/.ssh/id_ed25519_sk_horus.pub";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.eboskma.programs.ssh = { enable = mkEnableOption "activate ssh"; };
|
options.eboskma.programs.ssh = {
|
||||||
|
enable = mkEnableOption "activate ssh";
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
|
@ -60,12 +60,15 @@ in
|
||||||
identityFile = personalKey;
|
identityFile = personalKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
hass =
|
hass = {
|
||||||
{
|
hostname = "10.0.0.254";
|
||||||
hostname = "10.0.0.254";
|
user = "root";
|
||||||
user = "root";
|
identityFile = "~/.ssh/id_ed25519";
|
||||||
identityFile = "~/.ssh/id_ed25519";
|
extraOptions = {
|
||||||
|
ControlMaster = "auto";
|
||||||
|
ControlPersist = "10m";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
horus-vpn = {
|
horus-vpn = {
|
||||||
hostname = "192.168.4.202";
|
hostname = "192.168.4.202";
|
||||||
|
|
Loading…
Reference in a new issue