1
0

Deploy chisel on porter

This commit is contained in:
clerie 2021-07-23 23:32:33 +02:00
parent b7798bf8ee
commit 6cec90bdfa
3 changed files with 31 additions and 0 deletions

View File

@ -75,6 +75,9 @@
};
};
clerie.chisel.enable = true;
networking.firewall.allowedTCPPorts = [ 443 ];
networking.firewall.allowedUDPPorts = [ 50101 50138 51337 ];
services.bird2.enable = true;

View File

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.clerie.chisel;
in {
options = {
clerie.chisel = {
enable = mkEnableOption "Chisel Tunnel Service";
};
};
config = {
systemd.services.chisel = mkIf cfg.enable {
description = "Chisel Tunnel";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${pkgs.chisel}/bin/chisel server --port 443 --authfile /var/src/secrets/chisel/users.json";
Restart = "always";
};
};
};
}

View File

@ -4,6 +4,7 @@
imports = [
./policyrouting
./anycast_healthchecker
./chisel
./gitea
./gre-tunnel
./minecraft-server