mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-09 05:14:41 -05:00
feat: forgejo test
This commit is contained in:
parent
95ca704508
commit
715a0271eb
2 changed files with 37 additions and 34 deletions
|
@ -1,7 +1,7 @@
|
|||
{instancesFunctions}: let
|
||||
inherit
|
||||
(instancesFunctions)
|
||||
domain1
|
||||
{ instancesFunctions }:
|
||||
let
|
||||
inherit (instancesFunctions)
|
||||
domain3
|
||||
servicePath
|
||||
sslPath
|
||||
sopsPath
|
||||
|
@ -9,11 +9,12 @@
|
|||
|
||||
mastodonLabel = "Mastodon";
|
||||
mastodonName = "mastodon";
|
||||
in {
|
||||
in
|
||||
{
|
||||
label = mastodonLabel;
|
||||
name = mastodonName;
|
||||
email = {
|
||||
address0 = "thenutrivore@${domain1}";
|
||||
address0 = "noreply@${domain3}";
|
||||
};
|
||||
sops = {
|
||||
path0 = "${sopsPath}/${mastodonName}";
|
||||
|
@ -24,7 +25,7 @@ in {
|
|||
path2 = "";
|
||||
};
|
||||
ssl = {
|
||||
cert = "${sslPath}/${domain1}/fullchain.pem";
|
||||
key = "${sslPath}/${domain1}/key.pem";
|
||||
cert = "${sslPath}/${domain3}/fullchain.pem";
|
||||
key = "${sslPath}/${domain3}/key.pem";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue