Added hydra module

This commit is contained in:
Alejandro Angulo 2024-03-02 10:06:18 -08:00
parent 42a83db85e
commit 13d655a789
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
2 changed files with 43 additions and 0 deletions

View file

@ -88,5 +88,12 @@
# TODO: Re-enable this when I figure out how to prevent needing to build # TODO: Re-enable this when I figure out how to prevent needing to build
# dependencies for architectures other than the host machine # dependencies for architectures other than the host machine
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib; # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
hydraJobs = {
inherit
(inputs.self)
packages
;
};
}; };
} }

View file

@ -0,0 +1,36 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.aa.services.hydra;
in {
options.aa.services.hydra = with types; {
enable = mkEnableOption "hydra";
};
config = mkIf cfg.enable {
# NOTE: Need to create user to allow web configuration
# sudo -u hydra hydra-create-user alice \
# --full-name 'Alice Q. User' \
# --email-address 'alice@example.org' \
# --password-prompt \
# --role admin
services.hydra = {
enable = true;
hydraURL = "http://localhost:3000";
notificationSender = "hydra@localhost";
buildMachinesFiles = [];
useSubstitutes = true;
};
nix.settings = {
allowed-users = ["hydra"];
allowed-uris = ["github:"];
};
};
}