Deploy chisel on porter
This commit is contained in:
27
modules/chisel/default.nix
Normal file
27
modules/chisel/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user