summaryrefslogtreecommitdiff
path: root/home-modules/autossh-proxy.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2026-09-28 10:56:55 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2026-09-28 10:56:55 +0200
commita4acc43150d3315d21578e3bfb7290fa2c34f1ac (patch)
treeabba670a5f81109a6bd1fd717de04dd58380da9a /home-modules/autossh-proxy.nix
parent0fbdb0cd87a55ac26df54694386953281850d0a9 (diff)
downloadnixos-flakes.tar
nixos-flakes.tar.gz
nixos-flakes.tar.bz2
nixos-flakes.tar.xz
nixos-flakes.zip
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 };