mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-14 02:20:53 -06:00
chore: updated sops secrets
This commit is contained in:
parent
e341e5878f
commit
8cd193ec49
3 changed files with 10 additions and 46 deletions
|
|
@ -40,8 +40,8 @@ in
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
APP_URL = "https://${host}";
|
APP_URL = "https://${host}";
|
||||||
APP_KEY_FILE = "/etc/firefly-secrets/pass";
|
APP_KEY_FILE = "/etc/firefly-secrets/${user0}-pass";
|
||||||
DB_PASSWORD_FILE = "/etc/firefly-secrets/data";
|
DB_PASSWORD_FILE = "/etc/firefly-secrets/${user0}-data";
|
||||||
DB_CONNECTION = "pgsql";
|
DB_CONNECTION = "pgsql";
|
||||||
DB_HOST = "/run/postgresql";
|
DB_HOST = "/run/postgresql";
|
||||||
DB_DATABASE = "firefly-iii";
|
DB_DATABASE = "firefly-iii";
|
||||||
|
|
@ -51,7 +51,7 @@ in
|
||||||
MAIL_PORT = smtpCfg.ports.port0;
|
MAIL_PORT = smtpCfg.ports.port0;
|
||||||
MAIL_FROM = smtpCfg.email.address0;
|
MAIL_FROM = smtpCfg.email.address0;
|
||||||
MAIL_USERNAME = smtpCfg.email.address0;
|
MAIL_USERNAME = smtpCfg.email.address0;
|
||||||
MAIL_PASSWORD_FILE = "/etc/firefly-secrets/smtp";
|
MAIL_PASSWORD_FILE = "/etc/firefly-secrets/${user0}-smtp";
|
||||||
MAIL_ENCRYPTION = "tls";
|
MAIL_ENCRYPTION = "tls";
|
||||||
SITE_OWNER = email.address2;
|
SITE_OWNER = email.address2;
|
||||||
};
|
};
|
||||||
|
|
@ -123,9 +123,9 @@ in
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
mkdir -p /etc/firefly-secrets
|
mkdir -p /etc/firefly-secrets
|
||||||
cp /run/secrets/pass /etc/firefly-secrets/pass
|
cp /run/secrets/${user0}-pass /etc/firefly-secrets/${user0}-pass
|
||||||
cp /run/secrets/data /etc/firefly-secrets/data
|
cp /run/secrets/${user0}-data /etc/firefly-secrets/${user0}-data
|
||||||
cp /run/secrets/smtp /etc/firefly-secrets/smtp
|
cp /run/secrets/${user0}-smtp /etc/firefly-secrets/${user0}-smtp
|
||||||
chmod 755 /etc/firefly-secrets
|
chmod 755 /etc/firefly-secrets
|
||||||
chmod 644 /etc/firefly-secrets/*
|
chmod 644 /etc/firefly-secrets/*
|
||||||
'';
|
'';
|
||||||
|
|
@ -219,7 +219,7 @@ in
|
||||||
secrets = builtins.listToAttrs (
|
secrets = builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(secret: {
|
(secret: {
|
||||||
name = "${serviceCfg.name}/${secret}";
|
name = "${serviceCfg.name}/${user0}-${secret}";
|
||||||
value = {
|
value = {
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "root";
|
group = "root";
|
||||||
|
|
|
||||||
|
|
@ -32,36 +32,6 @@ let
|
||||||
log-level = "INFO";
|
log-level = "INFO";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
fedifetcherPython = pkgs.python3.withPackages (
|
|
||||||
ps: with ps; [
|
|
||||||
requests
|
|
||||||
pytz
|
|
||||||
beautifulsoup4
|
|
||||||
certifi
|
|
||||||
charset-normalizer
|
|
||||||
defusedxml
|
|
||||||
docutils
|
|
||||||
idna
|
|
||||||
iniconfig
|
|
||||||
packaging
|
|
||||||
pluggy
|
|
||||||
pytest
|
|
||||||
python-dateutil
|
|
||||||
requests
|
|
||||||
six
|
|
||||||
smmap
|
|
||||||
urllib3
|
|
||||||
xxhash
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
fedifetcherSrc = pkgs.fetchFromGitHub {
|
|
||||||
owner = "nanos";
|
|
||||||
repo = "FediFetcher";
|
|
||||||
rev = "main";
|
|
||||||
hash = "sha256-/J7psV/mA7okuuO7/aXVVWS9p63eMncG2CEEGN38ip0=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# If you need to start fresh for some reason, run these to create the new Admin account:
|
# If you need to start fresh for some reason, run these to create the new Admin account:
|
||||||
|
|
@ -343,7 +313,7 @@ in
|
||||||
done
|
done
|
||||||
|
|
||||||
export ACCESS_TOKEN=$(cat /etc/mastodon-secrets/fedifetcher-token)
|
export ACCESS_TOKEN=$(cat /etc/mastodon-secrets/fedifetcher-token)
|
||||||
${fedifetcherPython}/bin/python ${fedifetcherSrc}/find_posts.py \
|
${pkgs.fedifetcher}/bin/fedifetcher \
|
||||||
-c=${fedifetcherConfig} \
|
-c=${fedifetcherConfig} \
|
||||||
--access-token="$ACCESS_TOKEN"
|
--access-token="$ACCESS_TOKEN"
|
||||||
'';
|
'';
|
||||||
|
|
@ -436,12 +406,6 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = builtins.attrValues {
|
|
||||||
inherit
|
|
||||||
fedifetcherPython
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
microvm = {
|
microvm = {
|
||||||
vcpu = 2;
|
vcpu = 2;
|
||||||
mem = 1024 * 6;
|
mem = 1024 * 6;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# Environment file with secrets (mounted from host)
|
# Environment file with secrets (mounted from host)
|
||||||
environmentFile = "/run/secrets/env";
|
environmentFile = "/run/secrets/${user0}-env";
|
||||||
};
|
};
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -185,7 +185,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"${serviceCfg.name}/env" = {
|
"${serviceCfg.name}/${user0}-env" = {
|
||||||
owner = "root";
|
owner = "root";
|
||||||
mode = "0600";
|
mode = "0600";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue