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

@@ -11,7 +11,7 @@
spModuleSchemaVersion = 1; spModuleSchemaVersion = 1;
id = "writefreely"; id = "writefreely";
name = "WriteFreely"; name = "WriteFreely";
description = "An open source platform for building a writing space on the web."; description = "An open source platform for building a writing space on the web. Notice that the first signed in user will become the only admin automatically, and there is no possibility to change this.";
svgIcon = builtins.readFile ./icon.svg; svgIcon = builtins.readFile ./icon.svg;
isMovable = true; isMovable = true;
isRequired = false; isRequired = false;

View File

@@ -41,7 +41,7 @@ in
(lib.mkOption { (lib.mkOption {
default = "writefreely"; default = "writefreely";
type = lib.types.strMatching "[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]"; 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 = { meta = {
@@ -63,6 +63,18 @@ in
weight = 1; 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 = enableFederation =
(lib.mkOption { (lib.mkOption {
default = false; default = false;
@@ -72,7 +84,7 @@ in
// { // {
meta = { meta = {
type = "bool"; type = "bool";
weight = 2; weight = 3;
}; };
}; };
}; };
@@ -101,6 +113,7 @@ in
app = { app = {
host = lib.mkForce "https://${cfg.subdomain}.${sp.domain}"; host = lib.mkForce "https://${cfg.subdomain}.${sp.domain}";
site_name = cfg.appName; site_name = cfg.appName;
site_description = cfg.description;
single_user = false; single_user = false;
federation = cfg.enableFederation; federation = cfg.enableFederation;
disable_password_auth = true; disable_password_auth = true;