init loadedskypotato

This commit is contained in:
Clayton Hickey 2026-02-08 17:39:45 -05:00
parent 93f39c8a0d
commit d8abcde57a
11 changed files with 1233 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{
pkgs,
config,
lib,
...
}:
let cfg = config.cos.trilium; in
{
options.cos.trilium = {
enable = lib.mkEnableOption "trilium-server";
hostname = lib.mkOption {
type = lib.types.str;
};
port = lib.mkOption {
type = lib.types.port;
};
dataDir = lib.mkOption {
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
services.trilium-server = {
enable = true;
package = pkgs.trilium-next-server;
port = cfg.port;
dataDir = cfg.dataDir;
};
services.cloudflared.tunnels."4fc85af1-38f7-4c96-856c-7c797c5e3bf8".ingress.${cfg.hostname} = "http://${config.services.trilium-server.host}:${builtins.toString cfg.port}";
};
}