feat: forgejo test

This commit is contained in:
Nick 2025-01-18 22:17:14 -06:00
parent c34f5b0911
commit 5acbf5a77f

View file

@ -3,13 +3,12 @@
config,
pkgs,
...
}: let
inherit
(flake.config.machines.devices)
}:
let
inherit (flake.config.machines.devices)
server
;
inherit
(flake.config.services.instances)
inherit (flake.config.services.instances)
caddy
peertube
web
@ -17,7 +16,8 @@
service = peertube;
localhost = web.localhost.address0;
host = "${service.subdomain}.${web.domains.url3}";
in {
in
{
services = {
peertube = {
configureNginx = false;
@ -29,18 +29,18 @@ in {
localDomain = host;
serviceEnvironmentFile = config.sops.secrets."${service.name}-root".path;
user = service.name;
plugins = {
enable = true;
plugins = builtins.attrValues {
inherit
(pkgs)
peertube-plugin-livechat
peertube-plugin-matomo
peertube-plugin-transcoding-custom-quality
peertube-theme-dark
;
};
};
# plugins = {
# enable = true;
# plugins = builtins.attrValues {
# inherit
# (pkgs)
# peertube-plugin-livechat
# peertube-plugin-matomo
# peertube-plugin-transcoding-custom-quality
# peertube-theme-dark
# ;
# };
# };
secrets = {
secretsFile = config.sops.secrets."${service.name}-secret".path;
@ -91,28 +91,30 @@ in {
};
};
sops = let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}-pass";
owner = service.name;
mode = "600";
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}-pass";
owner = service.name;
mode = "600";
};
in
{
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"smtp"
"database"
"redis"
"root"
"secret"
]
);
};
in {
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"smtp"
"database"
"redis"
"root"
"secret"
]
);
};
fileSystems."/var/lib/${service.name}" = {
device = service.paths.path0;