This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / configs / tor-ssh.nix
854 B 34 lines
1{ config, pkgs, ... }: 2{ 3 services.tor = { 4 enable = true; 5 relay.onionServices.ssh = { 6 version = 3; 7 map = [ 8 { 9 port = 22; 10 target.port = 22; 11 } 12 ]; 13 secretKey = config.clan.core.vars.generators.tor-ssh.files."hs_ed25519_secret_key".path; 14 }; 15 controlSocket.enable = true; 16 client.enable = true; 17 }; 18 19 clan.core.vars.generators.tor-ssh = { 20 files."hs_ed25519_secret_key" = { }; 21 files."hostname".deploy = false; 22 runtimeInputs = with pkgs; [ 23 coreutils 24 tor 25 ]; 26 script = '' 27 mkdir -p data 28 echo -e "DataDirectory ./data\nSocksPort 0\nHiddenServiceDir ./hs\nHiddenServicePort 80 127.0.0.1:80" > torrc 29 timeout 2 tor -f torrc || : 30 mv hs/hs_ed25519_secret_key $out/hs_ed25519_secret_key 31 mv hs/hostname $out/hostname 32 ''; 33 }; 34}