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