2024-12-18 09:40:11 +03:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = {
|
|
|
|
main = {
|
|
|
|
compression = "none";
|
|
|
|
defaultformatter = "plaintext";
|
|
|
|
discussion = false;
|
|
|
|
email = true;
|
|
|
|
fileupload = false;
|
|
|
|
languageselection = false;
|
|
|
|
name = "voronind pastebin";
|
|
|
|
password = true;
|
|
|
|
qrcode = true;
|
|
|
|
sizelimit = 10 * 1000 * 1000;
|
|
|
|
template = "bootstrap";
|
|
|
|
};
|
|
|
|
expire = {
|
|
|
|
default = "1week";
|
|
|
|
};
|
|
|
|
formatter_options = {
|
|
|
|
markdown = "Markdown";
|
|
|
|
plaintext = "Plain Text";
|
|
|
|
syntaxhighlighting = "Source Code";
|
|
|
|
};
|
|
|
|
traffic = {
|
|
|
|
limit = 10;
|
|
|
|
};
|
|
|
|
purge = {
|
|
|
|
limit = 0;
|
|
|
|
batchsize = 10;
|
|
|
|
};
|
|
|
|
model = {
|
|
|
|
class = "Database";
|
|
|
|
};
|
|
|
|
model_options = {
|
|
|
|
"opt[12]" = true;
|
|
|
|
dsn = "pgsql:dbname=privatebin";
|
|
|
|
pwd = "privatebin";
|
|
|
|
tbl = "privatebin_";
|
|
|
|
usr = "privatebin";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2024-10-11 23:27:07 +03:00
|
|
|
{
|
2024-12-18 09:40:11 +03:00
|
|
|
file =
|
|
|
|
(pkgs.formats.ini {
|
|
|
|
mkKeyValue =
|
|
|
|
with lib.generators;
|
|
|
|
mkKeyValueDefault {
|
|
|
|
mkValueString = v: if builtins.isString v then "\"${toString v}\"" else toString v;
|
|
|
|
} " = ";
|
|
|
|
}).generate
|
|
|
|
"PrivateBinConfig"
|
|
|
|
cfg;
|
2024-06-01 10:37:49 +03:00
|
|
|
}
|