Home Gen69 @ 2025-10-31-00:59 by jonas@monolith

This commit is contained in:
2025-10-31 00:59:33 +01:00
parent a469c09921
commit e56f375478
3 changed files with 22 additions and 12 deletions

View File

@@ -6,14 +6,14 @@
}: let
cfg = config.hive.gotify;
cli-config = {
token = config.sops.placeholder.${cfg.tokenSopsKey};
token = config.sops.placeholder.${cfg.cli.tokenSopsKey};
inherit (cfg.cli) url defaultPriority;
};
daemon-config = {
gotify =
{
inherit (cfg.daemon) url;
token = config.sops.placeholder.${cfg.tokenSopsKey};
token = config.sops.placeholder.${cfg.daemon.tokenSopsKey};
auto_delete = cfg.daemon.autoDelete;
min_priority = cfg.daemon.minPriority;
}
@@ -64,6 +64,10 @@ in {
example = "http://gotify.example.com";
description = "The http url of the gotify server (for the cli tool)";
};
tokenSopsKey = lib.mkOption {
type = lib.types.singleLineStr;
description = "The sops key of the token secret";
};
defaultPriority = lib.mkOption {
type = lib.types.int;
default = 0;
@@ -79,6 +83,10 @@ in {
example = "ws://gotify.example.com";
description = "The websocket url of the gotify server (for the desktop tool)";
};
tokenSopsKey = lib.mkOption {
type = lib.types.singleLineStr;
description = "The sops key of the token secret";
};
autoDelete = lib.mkOption {
type = lib.types.bool;
default = false;
@@ -112,10 +120,6 @@ in {
example = 443;
description = "The port of the gotify server";
};
tokenSopsKey = lib.mkOption {
type = lib.types.singleLineStr;
description = "The sops key of the token secret";
};
};
config = let