Remove the integration feed for schema
schema no longer reads walks and meals from puppy-tracker, so the read-only /api/integration/events feed, its flags and the module's integration options go. A config still setting them is told they were removed.
This commit is contained in:
1 parent
ffa15ff2e7
commit
7b1b0889c6
4 files changed
+7
-220
No files matched your search
+7
-29
@@ -6,6 +6,12 @@ let
|
||||
serverPkg = self.packages.${pkgs.system}.server;
|
||||
in
|
||||
{
|
||||
# The feed schema read walks from is gone; a config that still sets it
|
||||
# is told so, rather than getting an unknown-option error.
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "services" "puppy-tracker" "integration" ] "The integration feed for schema was removed.")
|
||||
];
|
||||
|
||||
options.services.puppy-tracker = {
|
||||
enable = lib.mkEnableOption "Puppy Tracker (offline-first puppy tracking app with sync server)";
|
||||
|
||||
@@ -63,24 +69,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
integration = {
|
||||
tokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
example = "/run/agenix/schema-puppy-token";
|
||||
description = ''
|
||||
File holding a bearer token (just the token) that unlocks the
|
||||
read-only GET /api/integration/events feed of walks and meals, used by
|
||||
other services on this host. When null the endpoint doesn't exist.
|
||||
'';
|
||||
};
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "Email of the account the feed exposes. Empty means the only account.";
|
||||
};
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = serverPkg;
|
||||
@@ -108,17 +96,7 @@ in
|
||||
"-addr ${cfg.address}:${toString cfg.port}"
|
||||
"-static ${cfg.staticPackage}/share/puppy-tracker"
|
||||
"-data /var/lib/puppy-tracker/puppy.db"
|
||||
] ++ lib.optional cfg.secureCookies "-secure-cookies"
|
||||
# %d is the unit's credentials directory (see LoadCredential below).
|
||||
++ lib.optionals (cfg.integration.tokenFile != null) [
|
||||
"-integration-token-file %d/integration-token"
|
||||
"-integration-user ${lib.escapeShellArg cfg.integration.user}"
|
||||
]);
|
||||
|
||||
# DynamicUser can't own the secret, so systemd reads it as root and
|
||||
# hands the service a private copy.
|
||||
LoadCredential = lib.optional (cfg.integration.tokenFile != null)
|
||||
"integration-token:${toString cfg.integration.tokenFile}";
|
||||
] ++ lib.optional cfg.secureCookies "-secure-cookies");
|
||||
|
||||
# Secrets (registration code, Web Push key) are read from env files kept
|
||||
# out of the store, exposed to the server as PUPPY_INVITE_CODE and
|
||||
|
||||
Reference in new issue
Block a user