add mastodon
This commit is contained in:
parent
052a649ed7
commit
f55f187d08
3 changed files with 12 additions and 4 deletions
|
@ -180,7 +180,6 @@
|
|||
hostname = "mastodon";
|
||||
ip = "192.168.0.138";
|
||||
mac = "52:60:8a:06:86:9c";
|
||||
nix = false;
|
||||
}
|
||||
{
|
||||
hostname = "lidarr";
|
||||
|
|
|
@ -14,7 +14,17 @@ in {
|
|||
package = pkgs.elasticsearch7;
|
||||
};
|
||||
|
||||
vault-secrets.secrets.mastodon = { };
|
||||
vault-secrets.secrets.mastodon = {
|
||||
services = [ "mastodon-init-dirs" "mastodon" ];
|
||||
};
|
||||
|
||||
# Append the init-dirs script to add AWS/Minio secrets
|
||||
systemd.services.mastodon-init-dirs.script = ''
|
||||
cat >> /var/lib/mastodon/.secrets_env <<EOF
|
||||
AWS_ACCESS_KEY_ID="$(cat ${vs.mastodon}/awsAccessKeyId)"
|
||||
AWS_SECRET_ACCESS_KEY="$(cat ${vs.mastodon}/awsSecretAccessKey)"
|
||||
EOF
|
||||
'';
|
||||
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
|
@ -72,8 +82,6 @@ in {
|
|||
S3_ENABLED = "true";
|
||||
S3_BUCKET = "mastodon";
|
||||
S3_PROTOCOL = "https";
|
||||
AWS_ACCESS_KEY_ID = secrets.awsAccessKey;
|
||||
AWS_SECRET_ACCESS_KEY = secrets.awsSecretKey;
|
||||
S3_HOSTNAME = "o.xirion.net";
|
||||
S3_ENDPOINT = "https://o.xirion.net/";
|
||||
};
|
||||
|
|
|
@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildPhase = ''
|
||||
export HOME=$PWD
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
fixup_yarn_lock ~/yarn.lock
|
||||
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
|
|
Loading…
Reference in a new issue