nixos/lemmy: settings.database.createLocally -> database.createLocally
Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com> Co-authored-by: Ctem <c@ctem.me> Co-authored-by: a-kenji <aks.kenji@protonmail.com>
This commit is contained in:
@@ -484,6 +484,14 @@
|
|||||||
<literal>services.datadog-agent</literal> module.
|
<literal>services.datadog-agent</literal> module.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
lemmy module option
|
||||||
|
<literal>services.lemmy.settings.database.createLocally</literal>
|
||||||
|
moved to
|
||||||
|
<literal>services.lemmy.database.createLocally</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
virtlyst package and <literal>services.virtlyst</literal>
|
virtlyst package and <literal>services.virtlyst</literal>
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
|
|||||||
|
|
||||||
- dd-agent package removed along with the `services.dd-agent` module, due to the project being deprecated in favor of `datadog-agent`, which is available via the `services.datadog-agent` module.
|
- dd-agent package removed along with the `services.dd-agent` module, due to the project being deprecated in favor of `datadog-agent`, which is available via the `services.datadog-agent` module.
|
||||||
|
|
||||||
|
- lemmy module option `services.lemmy.settings.database.createLocally`
|
||||||
|
moved to `services.lemmy.database.createLocally`.
|
||||||
|
|
||||||
- virtlyst package and `services.virtlyst` module removed, due to lack of maintainers.
|
- virtlyst package and `services.virtlyst` module removed, due to lack of maintainers.
|
||||||
|
|
||||||
- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
|
- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ in
|
|||||||
|
|
||||||
caddy.enable = mkEnableOption (lib.mdDoc "exposing lemmy with the caddy reverse proxy");
|
caddy.enable = mkEnableOption (lib.mdDoc "exposing lemmy with the caddy reverse proxy");
|
||||||
|
|
||||||
|
database.createLocally = mkEnableOption (lib.mdDoc "creation of database on the instance");
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
description = lib.mdDoc "Lemmy configuration";
|
description = lib.mdDoc "Lemmy configuration";
|
||||||
@@ -63,9 +65,6 @@ in
|
|||||||
description = lib.mdDoc "The difficultly of the captcha to solve.";
|
description = lib.mdDoc "The difficultly of the captcha to solve.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
options.database.createLocally = mkEnableOption (lib.mdDoc "creation of database on the instance");
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,7 +141,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = cfg.settings.database.createLocally -> localPostgres;
|
assertion = cfg.database.createLocally -> localPostgres;
|
||||||
message = "if you want to create the database locally, you need to use a local database";
|
message = "if you want to create the database locally, you need to use a local database";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@@ -163,9 +162,9 @@ in
|
|||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
after = [ "pict-rs.service" ] ++ lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ];
|
after = [ "pict-rs.service" ] ++ lib.optionals cfg.database.createLocally [ "lemmy-postgresql.service" ];
|
||||||
|
|
||||||
requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ];
|
requires = lib.optionals cfg.database.createLocally [ "lemmy-postgresql.service" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
@@ -203,7 +202,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.lemmy-postgresql = mkIf cfg.settings.database.createLocally {
|
systemd.services.lemmy-postgresql = mkIf cfg.database.createLocally {
|
||||||
description = "Lemmy postgresql db";
|
description = "Lemmy postgresql db";
|
||||||
after = [ "postgresql.service" ];
|
after = [ "postgresql.service" ];
|
||||||
partOf = [ "lemmy.service" ];
|
partOf = [ "lemmy.service" ];
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ in
|
|||||||
services.lemmy = {
|
services.lemmy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ui.port = uiPort;
|
ui.port = uiPort;
|
||||||
|
database.createLocally = true;
|
||||||
settings = {
|
settings = {
|
||||||
hostname = "http://${lemmyNodeName}";
|
hostname = "http://${lemmyNodeName}";
|
||||||
port = backendPort;
|
port = backendPort;
|
||||||
database.createLocally = true;
|
|
||||||
# Without setup, the /feeds/* and /nodeinfo/* API endpoints won't return 200
|
# Without setup, the /feeds/* and /nodeinfo/* API endpoints won't return 200
|
||||||
setup = {
|
setup = {
|
||||||
admin_username = "mightyiam";
|
admin_username = "mightyiam";
|
||||||
|
|||||||
Reference in New Issue
Block a user