Added allowed URI

This commit is contained in:
Alejandro Angulo 2024-06-01 00:44:46 -07:00
parent a0ff12a4c6
commit e32ee91ce1
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6

View file

@ -1,24 +1,21 @@
{ {
options,
config, config,
lib, lib,
pkgs,
... ...
}: }: let
with lib; let
cfg = config.aa.services.hydra; cfg = config.aa.services.hydra;
in { in {
options.aa.services.hydra = with types; { options.aa.services.hydra = with lib; {
enable = mkEnableOption "hydra"; enable = mkEnableOption "hydra";
hostname = mkOption { hostname = mkOption {
type = str; type = types.str;
default = "hydra.kilonull.com"; default = "hydra.kilonull.com";
description = '' description = ''
The hostname for the hydra instance The hostname for the hydra instance
''; '';
}; };
acmeCertName = mkOption { acmeCertName = mkOption {
type = str; type = types.str;
default = ""; default = "";
description = '' description = ''
If set to a non-empty string, forces SSL with the supplied acme If set to a non-empty string, forces SSL with the supplied acme
@ -27,21 +24,21 @@ in {
}; };
secretKeyPath = mkOption { secretKeyPath = mkOption {
type = str; type = types.str;
description = '' description = ''
The secret key used to sign builds uploaded to s3. The secret key used to sign builds uploaded to s3.
''; '';
}; };
s3Bucket = mkOption { s3Bucket = mkOption {
type = str; type = types.str;
description = '' description = ''
The s3 bucket name where build artifacts will be uploaded. The s3 bucket name where build artifacts will be uploaded.
''; '';
}; };
s3Scheme = mkOption { s3Scheme = mkOption {
type = str; type = types.str;
default = "https"; default = "https";
description = '' description = ''
The scheme to use when connecting to s3. The scheme to use when connecting to s3.
@ -49,7 +46,7 @@ in {
}; };
s3Endpoint = mkOption { s3Endpoint = mkOption {
type = str; type = types.str;
description = '' description = ''
The s3 server endpoint. The s3 server endpoint.
@ -58,7 +55,7 @@ in {
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets = { age.secrets = {
hydra-aws-creds.file = ../../../../secrets/hydra-aws-creds.age; hydra-aws-creds.file = ../../../../secrets/hydra-aws-creds.age;
}; };
@ -105,7 +102,7 @@ in {
"hydra" "hydra"
"hydra-www" "hydra-www"
]; ];
allowed-uris = ["github:"]; allowed-uris = ["github:" "https://github.com/"];
}; };
}; };
} }