2022-02-18 14:49:19 +00:00
|
|
|
{ ... }: {
|
|
|
|
imports = [
|
|
|
|
./postgres.nix
|
2022-02-18 15:58:36 +00:00
|
|
|
../../modules/hydra.nix
|
2022-02-18 19:36:49 +00:00
|
|
|
./copy-to-cache.nix
|
2022-02-18 14:49:19 +00:00
|
|
|
];
|
|
|
|
services.hydra = {
|
|
|
|
enable = true;
|
|
|
|
hydraURL = "http://localhost:3000";
|
|
|
|
notificationSender = "hydra@chir.rs";
|
2022-02-18 14:56:22 +00:00
|
|
|
useSubstitutes = true;
|
2022-02-18 15:58:36 +00:00
|
|
|
extraConfig = ''
|
|
|
|
<gitea_authorization>
|
|
|
|
darkkirb = #gitea_token#
|
|
|
|
</gitea_authorization>
|
|
|
|
'';
|
|
|
|
giteaTokenFile = "/run/secrets/services/hydra/gitea_token";
|
2022-02-18 14:49:19 +00:00
|
|
|
};
|
|
|
|
services.postgresql.ensureDatabases = [ "hydra" ];
|
|
|
|
services.postgresql.ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "hydra";
|
|
|
|
ensurePermissions = {
|
|
|
|
"DATABASE hydra" = "ALL PRIVILEGES";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-02-18 15:28:32 +00:00
|
|
|
nix.settings.allowed-uris = [ "https://github.com/" "https://git.chir.rs/" "https://minio.int.chir.rs/" ];
|
2022-02-18 16:04:53 +00:00
|
|
|
sops.secrets."services/hydra/gitea_token" = { };
|
2022-02-18 14:49:19 +00:00
|
|
|
}
|