Added hydra module
This commit is contained in:
parent
42a83db85e
commit
13d655a789
|
@ -88,5 +88,12 @@
|
|||
# TODO: Re-enable this when I figure out how to prevent needing to build
|
||||
# dependencies for architectures other than the host machine
|
||||
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
|
||||
|
||||
hydraJobs = {
|
||||
inherit
|
||||
(inputs.self)
|
||||
packages
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
36
modules/nixos/services/hydra/default.nix
Normal file
36
modules/nixos/services/hydra/default.nix
Normal 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:"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue