From d2bbea44ab9e09175c445f68e9db06d0460840e1 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Mon, 5 Feb 2024 11:12:28 +0100 Subject: [PATCH] ssh: Enable ControlMaster for hass --- home-manager/modules/ssh/default.nix | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/home-manager/modules/ssh/default.nix b/home-manager/modules/ssh/default.nix index a4f30e3..09b90f0 100644 --- a/home-manager/modules/ssh/default.nix +++ b/home-manager/modules/ssh/default.nix @@ -1,15 +1,15 @@ -{ config -, lib -, ... -}: -with lib; let +{ config, lib, ... }: +with lib; +let cfg = config.eboskma.programs.ssh; var = config.eboskma.var; personalKey = "~/.ssh/id_ed25519_sk_personal.pub"; horusKey = "~/.ssh/id_ed25519_sk_horus.pub"; in { - options.eboskma.programs.ssh = { enable = mkEnableOption "activate ssh"; }; + options.eboskma.programs.ssh = { + enable = mkEnableOption "activate ssh"; + }; config = mkIf cfg.enable { programs.ssh = { @@ -60,12 +60,15 @@ in identityFile = personalKey; }; - hass = - { - hostname = "10.0.0.254"; - user = "root"; - identityFile = "~/.ssh/id_ed25519"; + hass = { + hostname = "10.0.0.254"; + user = "root"; + identityFile = "~/.ssh/id_ed25519"; + extraOptions = { + ControlMaster = "auto"; + ControlPersist = "10m"; }; + }; horus-vpn = { hostname = "192.168.4.202";