mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:55:22 +08:00
@@ -22,7 +22,8 @@ inputs:
|
||||
after = [ "network.target" "redis-misskey-${instance.name}.service" "postgresql.service" ];
|
||||
requires = after;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.MISSKEY_CONFIG_HAVE_COMPILED = "1";
|
||||
environment.MISSKEY_CONFIG_YML =
|
||||
inputs.config.nixos.system.sops.templates."misskey/${instance.name}.yml".path;
|
||||
serviceConfig = rec
|
||||
{
|
||||
User = "misskey-${instance.name}";
|
||||
@@ -46,11 +47,6 @@ inputs:
|
||||
device = "${inputs.pkgs.localPackages.misskey}";
|
||||
options = [ "bind" "private" "x-gvfs-hide" "X-fstrim.notrim" ];
|
||||
};
|
||||
"/var/lib/misskey/${instance.name}/built/.config.json" =
|
||||
{
|
||||
device = inputs.config.nixos.system.sops.templates."misskey/${instance.name}.json".path;
|
||||
options = [ "bind" "private" "x-gvfs-hide" "X-fstrim.notrim" ];
|
||||
};
|
||||
"/var/lib/misskey/${instance.name}/work/files" =
|
||||
{
|
||||
device = "/var/lib/misskey/${instance.name}/files";
|
||||
@@ -93,45 +89,43 @@ inputs:
|
||||
system.sops.templates = builtins.listToAttrs (builtins.map
|
||||
(instance:
|
||||
{
|
||||
name = "misskey/${instance.name}.json";
|
||||
name = "misskey/${instance.name}.yml";
|
||||
value =
|
||||
{
|
||||
content =
|
||||
let
|
||||
placeholder = inputs.config.nixos.system.sops.placeholder;
|
||||
redis = inputs.config.nixos.services.redis.instances."misskey-${instance.name}";
|
||||
in builtins.toJSON
|
||||
{
|
||||
url = "https://${instance.value.hostname}/";
|
||||
port = instance.value.port;
|
||||
db =
|
||||
{
|
||||
host = "127.0.0.1";
|
||||
port = 5432;
|
||||
db = "misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}";
|
||||
user = "misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}";
|
||||
pass = placeholder."postgresql/misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}";
|
||||
extra.statement_timeout = 600000;
|
||||
};
|
||||
dbReplications = false;
|
||||
redis =
|
||||
{
|
||||
host = "127.0.0.1";
|
||||
port = redis.port;
|
||||
pass = placeholder."redis/misskey-${instance.name}";
|
||||
};
|
||||
id = "aid";
|
||||
proxyBypassHosts =
|
||||
[
|
||||
"api.deepl.com" "api-free.deepl.com" "www.recaptcha.net" "hcaptcha.com"
|
||||
"challenges.cloudflare.com"
|
||||
];
|
||||
proxyRemoteFiles = true;
|
||||
signToActivityPubGet = true;
|
||||
maxFileSize = 1073741824;
|
||||
fulltextSearch.provider = "sqlPgroonga";
|
||||
trustProxy = true;
|
||||
};
|
||||
in
|
||||
''
|
||||
url: https://${instance.value.hostname}/
|
||||
port: ${toString instance.value.port}
|
||||
db:
|
||||
host: 127.0.0.1
|
||||
port: 5432
|
||||
db: misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}
|
||||
user: misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}
|
||||
pass: ${placeholder."postgresql/misskey_${builtins.replaceStrings [ "-" ] [ "_" ] instance.name}"}
|
||||
extra:
|
||||
statement_timeout: 600000
|
||||
dbReplications: false
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: ${builtins.toString redis.port}
|
||||
pass: ${placeholder."redis/misskey-${instance.name}"}
|
||||
id: 'aid'
|
||||
proxyBypassHosts:
|
||||
- api.deepl.com
|
||||
- api-free.deepl.com
|
||||
- www.recaptcha.net
|
||||
- hcaptcha.com
|
||||
- challenges.cloudflare.com
|
||||
proxyRemoteFiles: true
|
||||
signToActivityPubGet: true
|
||||
maxFileSize: 1073741824
|
||||
fulltextSearch:
|
||||
provider: sqlPgroonga
|
||||
'';
|
||||
owner = "misskey-${instance.name}";
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user