feat: forgejo test

This commit is contained in:
Nick 2025-01-19 00:32:58 -06:00
parent 95ca704508
commit 715a0271eb
2 changed files with 37 additions and 34 deletions

View file

@ -4,20 +4,20 @@
pkgs,
lib,
...
}: let
inherit
(flake.config.machines.devices)
}:
let
inherit (flake.config.machines.devices)
server
;
inherit
(flake.config.services.instances)
inherit (flake.config.services.instances)
mastodon
web
;
service = mastodon;
host = web.domains.url1;
host = web.domains.url3;
localhost = web.localhost.address0;
in {
in
{
# If you need to start fresh for some reason, run these to create the new Admin account:
# sudo -u mastodon mastodon-tootctl accounts create nick --email=nick@localhost --confirmed --role=Owner
# sudo -u mastodon mastodon-tootctl accounts approve nick
@ -165,26 +165,28 @@ in {
"/run/mastodon-web"
];
sops = let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}";
owner = service.name;
mode = "600";
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}";
owner = service.name;
mode = "600";
};
in
{
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"smtp"
"database"
"redis"
]
);
};
in {
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"smtp"
"database"
"redis"
]
);
};
fileSystems."/var/lib/${service.name}" = {
device = service.paths.path0;