mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Add chisel
This commit is contained in:
parent
c06ba9ab5d
commit
051baa2900
4 changed files with 38 additions and 9 deletions
|
|
@ -42,6 +42,9 @@
|
|||
nixCacheKey = {
|
||||
key = "nix/cache_secret_key";
|
||||
};
|
||||
chiselAuthFile = {
|
||||
key = "chisel/auth.json";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
|
@ -517,4 +520,25 @@
|
|||
path = "/nix/var/data/epicerie_du_cellier_backup";
|
||||
};
|
||||
};
|
||||
|
||||
services.chisel-server = {
|
||||
enable = true;
|
||||
reverse = true;
|
||||
socks5 = true;
|
||||
port = 34220;
|
||||
host = "127.0.0.1";
|
||||
authfile = "/run/credentials/chisel-server.service/authfile";
|
||||
};
|
||||
|
||||
systemd.services.chisel-server.serviceConfig.LoadCredential =
|
||||
"authfile:${config.sops.secrets.chiselAuthFile.path}";
|
||||
|
||||
services.nginx.virtualHosts."ch.${config.networking.domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.chisel-server.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue