init loadedskypotato
This commit is contained in:
parent
93f39c8a0d
commit
d8abcde57a
11 changed files with 1233 additions and 0 deletions
32
loadedskypotato/trilium.nix
Normal file
32
loadedskypotato/trilium.nix
Normal 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}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue