feat: add caddy and lmstudio services to shiro configuration
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
"vlc"
|
"vlc"
|
||||||
"zed"
|
"zed"
|
||||||
"zen"
|
"zen"
|
||||||
|
"lmstudio"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
./yabai.nix
|
./yabai.nix
|
||||||
./skhd.nix
|
./skhd.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./ollama.nix
|
# ./ollama.nix
|
||||||
# ./aerospace.nix
|
# ./aerospace.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
42
darwin/shiro/services/caddy.nix
Normal file
42
darwin/shiro/services/caddy.nix
Normal 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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
./skhd.nix
|
./skhd.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./autossh.nix
|
./autossh.nix
|
||||||
|
# ./caddy.nix
|
||||||
|
# ./lmstudio.nix
|
||||||
# ./colima.nix
|
# ./colima.nix
|
||||||
# ./zerotier.nix
|
# ./zerotier.nix
|
||||||
# ./aerospace.nix
|
# ./aerospace.nix
|
||||||
|
|||||||
8
darwin/shiro/services/lmstudio.nix
Normal file
8
darwin/shiro/services/lmstudio.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{...}: {
|
||||||
|
services = {
|
||||||
|
caddy.virtualHosts."lmstudio.shiro.darksailor.dev" = ''
|
||||||
|
import hetzner
|
||||||
|
reverse_proxy localhost:1234
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -105,8 +105,19 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "openai-compatible";
|
type = "openai-compatible";
|
||||||
name = "LMStudio";
|
name = "kuro";
|
||||||
api_base = "http://localhost:1234/v1";
|
api_base = "http://kuro:1234/v1";
|
||||||
|
models = [
|
||||||
|
{
|
||||||
|
name = "openai/gpt-oss-20b";
|
||||||
|
type = "chat";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "openai-compatible";
|
||||||
|
name = "shiro";
|
||||||
|
api_base = "http://shiro:1234/v1";
|
||||||
models = [
|
models = [
|
||||||
{
|
{
|
||||||
name = "openai/gpt-oss-20b";
|
name = "openai/gpt-oss-20b";
|
||||||
|
|||||||
Reference in New Issue
Block a user