manatee: Add solo-referee module
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enabled = config.mod.solo-referee.enable;
|
||||
port = 8090;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mod.solo-referee = {
|
||||
enable = lib.mkEnableOption "Enable solo-referee module";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.solo-referee.nixosModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf enabled {
|
||||
mod.homepage.services = [
|
||||
{
|
||||
name = "Solo Referee";
|
||||
port = port;
|
||||
description = "Solo-RPG tool with Claude as GM";
|
||||
# url omitted → homepage links to http://manatee:${port}.
|
||||
}
|
||||
];
|
||||
|
||||
services.solo-referee = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
# Reachable on the LAN / Tailscale at manatee:${port}; no public vhost.
|
||||
address = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
# Anthropic API key kept out of the store; the file holds
|
||||
# `ANTHROPIC_API_KEY=...`. Without it the offline stub GM runs.
|
||||
apiKeyFile = config.age.secrets."solo-referee-api-key".path;
|
||||
};
|
||||
|
||||
age.secrets."solo-referee-api-key".file =
|
||||
../../../../secrets/manatee/solo-referee-api-key.age;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user