Skip to content

Commit

Permalink
Document pleroma module and options
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 15, 2023
1 parent 714bc5f commit 66e8ea4
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 10 deletions.
11 changes: 11 additions & 0 deletions shared/pleroma/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# [Pleroma][] is a fediverese server.
#
# Pleroma uses a containerised postgres database.
#
# If the `backups` module is enabled, adds a script to backup the database and
# uploaded files.
#
# If the `erase-your-darlings` module is enabled, stores its data on the
# persistent volume.
#
# [Pleroma]: https://pleroma.social/
{ config, lib, pkgs, ... }:

with lib;
Expand Down
91 changes: 81 additions & 10 deletions shared/pleroma/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,86 @@ with lib;

{
options.nixfiles.pleroma = {
enable = mkOption { type = types.bool; default = false; };
port = mkOption { type = types.int; default = 46283; };
pgTag = mkOption { type = types.str; default = "13"; };
domain = mkOption { type = types.str; };
faviconPath = mkOption { type = types.nullOr types.path; default = null; };
instanceName = mkOption { type = types.nullOr types.str; default = null; };
adminEmail = mkOption { type = types.str; default = "[email protected]"; };
notifyEmail = mkOption { type = types.nullOr types.str; default = null; };
allowRegistration = mkOption { type = types.bool; default = false; };
secretsFile = mkOption { type = types.str; };
enable = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Enable the `pleroma` service.
'';
};

port = mkOption {
type = types.int;
default = 46283;
description = mdDoc ''
Port (on 127.0.0.1) to expose the pleroma service on.
'';
};

pgTag = mkOption {
type = types.str;
default = "13";
description = mdDoc ''
Tag to use of the `postgres` container image.
'';
};

domain = mkOption {
type = types.str;
example = "social.lainon.life";
description = mdDoc ''
Domain which the service will be exposed on.
'';
};

faviconPath = mkOption {
type = types.nullOr types.path;
default = null;
description = mdDoc ''
Path to the favicon file.
'';
};

instanceName = mkOption {
type = types.nullOr types.str;
default = null;
description = mdDoc ''
Name of the instance, defaults to the `''${domain}` if not set.
'';
};

adminEmail = mkOption {
type = types.str;
default = "[email protected]";
description = mdDoc ''
Email address used to contact the server operator.
'';
};

notifyEmail = mkOption {
type = types.nullOr types.str;
default = null;
description = mdDoc ''
Email address used for notification, defaults to the `''${adminEmail}`
if not set.
'';
};

allowRegistration = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
Whether to allow new users to sign up.
'';
};

secretsFile = mkOption {
type = types.str;
description = mdDoc ''
Path to the secret configuration file.
See the Pleroma documentation for what this needs to contain.
'';
};
};
}

0 comments on commit 66e8ea4

Please sign in to comment.