feat: add caddy and lmstudio services to shiro configuration
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s

This commit is contained in:
uttarayan21
2025-08-20 16:02:20 +05:30
parent fcf6e2221f
commit 47bdbc8bf2
8 changed files with 67 additions and 3 deletions

View File

@@ -13,6 +13,7 @@
"vlc"
"zed"
"zen"
"lmstudio"
];
};
}

View File

@@ -3,7 +3,7 @@
./yabai.nix
./skhd.nix
./tailscale.nix
./ollama.nix
# ./ollama.nix
# ./aerospace.nix
];
}

View File

@@ -0,0 +1,42 @@
{
config,
pkgs,
...
}: {
sops = {
secrets."hetzner/api_key".owner = config.services.caddy.user;
templates = {
"HETZNER_API_KEY.env".content = ''
HETZNER_API_KEY=${config.sops.placeholder."hetzner/api_key"}
'';
};
};
services = {
caddy = {
enable = true;
extraConfig = ''
(hetzner) {
tls {
propagation_timeout -1
propagation_delay 120s
dns hetzner {env.HETZNER_API_KEY}
resolvers 1.1.1.1
}
}
'';
package = pkgs.caddy.withPlugins {
plugins = ["github.com/caddy-dns/hetzner@v1.0.0"];
# hash = "sha256-9ea0CfOHG7JhejB73HjfXQpnonn+ZRBqLNz1fFRkcDQ=";
# hash = "sha256-9ea0CfOHG7JhejB73HjfXQpnonn+ZRBqLNz1fFRkcDQ="
hash = "sha256-YUrprDZQL+cX3P8fVLKHouXTMG4rw3sCaQdGqiq37uA=";
};
};
};
systemd.services.caddy = {
serviceConfig = {
EnvironmentFile = config.sops.templates."HETZNER_API_KEY.env".path;
Requires = ["sops.service"];
After = ["sops.service"];
};
};
}

View File

@@ -4,6 +4,8 @@
./skhd.nix
./tailscale.nix
./autossh.nix
# ./caddy.nix
# ./lmstudio.nix
# ./colima.nix
# ./zerotier.nix
# ./aerospace.nix

View File

@@ -0,0 +1,8 @@
{...}: {
services = {
caddy.virtualHosts."lmstudio.shiro.darksailor.dev" = ''
import hetzner
reverse_proxy localhost:1234
'';
};
}