Compare commits

..

No commits in common. "10516f783a9857314b5a2fc2573d93a810512773" and "04d4ac2a9e835780fcd5f3db50a96b401106fc43" have entirely different histories.

4 changed files with 6 additions and 66 deletions

View file

@ -52,7 +52,6 @@
source .env
set +a
'' else "";
stderrToStdout = if sCfg.log.enable then "exec 2>&1" else "";
in
lib.mkMerge [
{
@ -60,7 +59,6 @@
"runit/services/${serviceName}/run" = {
text = ''
#!/usr/bin/env bash
${stderrToStdout}
${envExports}
${envFileSetup}
${sCfg.script}
@ -72,8 +70,7 @@
"runit/services/${serviceName}/log/run" = lib.mkIf sCfg.log.enable {
text = ''
#!/bin/sh
mkdir -p main
exec svlogd -tt ./main
exec svlogd -t ./main
'';
executable = true;
};

View file

@ -1,32 +0,0 @@
{ pkgs, config, ... }:
{
home.file.".config/caddy/Caddyfile".text = ''
{
http_port 8080
https_port 8443
auto_https off
}
# Cloudflare Tunnel
http://gist.toast.name {
# Opengist
reverse_proxy http://localhost:${config.runit.services.opengist.environment.OG_HTTP_PORT}
}
# Tailscale
http://y2q.ts.toast.name {
# Glances
reverse_proxy http://localhost:61208
}
'';
runit.services.caddy = {
script = ''
exec ${pkgs.caddy}/bin/caddy run \
--config "$HOME/.config/caddy/Caddyfile" \
--adapter caddyfile
'';
log.enable = true;
};
}

View file

@ -1,10 +1,7 @@
{ pkgs, config, rootPath, lib, ... }:
{ pkgs, config, rootPath, ... }:
let
tunnel = "cb0d9c2c-48f9-4bca-9e81-ef92423c5afa";
subdomains = [
"gist.toast.name"
];
in
{
home.file.".cloudflared/${tunnel}.json".source = rootPath + /secrets/gitcrypt/cloudflared/${tunnel}.json;
@ -14,11 +11,10 @@ in
credentials-file: ${config.home.homeDirectory}/.cloudflared/${tunnel}.json
ingress:
${lib.concatMapStringsSep "\n" (host: ''
${" "}- hostname: ${host}
${" "} service: http://localhost:80
'') subdomains}
${" "}- service: http_status:404
- hostname: gist.toast.name
service: http://${config.runit.services.opengist.environment.OG_HTTP_HOST}:${config.runit.services.opengist.environment.OG_HTTP_PORT}
- service: http_status:404
'';
runit.services.cloudflared = {

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
{
runit.services.restic-rest-server = {
script = ''
DATA_DIR=$HOME/services/restic-rest-server
mkdir -p "$DATA_DIR"
exec ${pkgs.restic-rest-server}/bin/rest-server \
--listen "$LISTEN_ADDR" \
--log - \
--no-auth \
--path $DATA_DIR \
--prometheus --prometheus-no-auth
'';
environment = {
LISTEN_ADDR = "127.0.0.1:9000";
};
};
}