This commit is contained in:
2025-11-18 23:01:47 +03:00
parent 2ef8bef684
commit 4b1a42fa0e
2 changed files with 16 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ in
(lib.mkOption {
default = "writefreely";
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]";
description = "Subdomain (changing subdomain after setting up will cause breakage of the federation!)";
description = "Subdomain (changing subdomain after enabling the federation will cause its breakage!)";
})
// {
meta = {
@@ -63,6 +63,18 @@ in
weight = 1;
};
};
description =
(lib.mkOption {
default = "WriteFreely instance.";
type = lib.types.str;
description = "Description of the WriteFreely instance. This makes no sense if the federation is not enabled.";
})
// {
meta = {
type = "string";
weight = 2;
};
};
enableFederation =
(lib.mkOption {
default = false;
@@ -72,7 +84,7 @@ in
// {
meta = {
type = "bool";
weight = 2;
weight = 3;
};
};
};
@@ -101,6 +113,7 @@ in
app = {
host = lib.mkForce "https://${cfg.subdomain}.${sp.domain}";
site_name = cfg.appName;
site_description = cfg.description;
single_user = false;
federation = cfg.enableFederation;
disable_password_auth = true;