summaryrefslogtreecommitdiff
path: root/home-modules/autossh-proxy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-modules/autossh-proxy.nix')
-rw-r--r--home-modules/autossh-proxy.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/home-modules/autossh-proxy.nix b/home-modules/autossh-proxy.nix
index e3179096..46cf1838 100644
--- a/home-modules/autossh-proxy.nix
+++ b/home-modules/autossh-proxy.nix
@@ -1,10 +1,10 @@
1{ lib, sysConfig, config, pkgs, ... }: 1{ lib, sysConfig, config, pkgs, ... }:
2 2
3let 3let
4 cfg = config.services.autosshProxy; 4 cfg = config.programs.ssh.autosshProxies;
5in { 5in {
6 options = { 6 options = {
7 services.autosshProxy = lib.mkOption { 7 programs.ssh.autosshProxies = lib.mkOption {
8 type = lib.types.attrsOf (lib.types.submodule ({ name, config, ... }: { 8 type = lib.types.attrsOf (lib.types.submodule ({ name, config, ... }: {
9 options = { 9 options = {
10 port = lib.mkOption { 10 port = lib.mkOption {
@@ -24,6 +24,12 @@ in {
24 sshpassSecret = lib.mkOption { 24 sshpassSecret = lib.mkOption {
25 type = lib.types.nullOr lib.types.str; 25 type = lib.types.nullOr lib.types.str;
26 }; 26 };
27
28 ProxyCommand = lib.mkOption {
29 type = lib.types.str;
30 readOnly = true;
31 default = "${lib.getExe pkgs.socat} - SOCKS4A:127.0.0.1:%h:%p,socksport=${toString config.port}";
32 };
27 }; 33 };
28 })); 34 }));
29 }; 35 };