blob: be30db3b4cd4918d57f2d47633baac377342196b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{ config, lib, pkgs, hydra, ... }:
with lib;
let
cfg = config.modules.services.hydra;
in
{
options.modules.services.hydra = {
enable = mkEnableOption "Whether to enable Hydra, a Nix-based continuous build system";
baseURL = mkOption {
type = types.str;
example = "https://hydra.kanata.network";
description = "The base URL for the Hydra webserver instance";
};
};
config = mkIf cfg.enable {
services.hydra = {
enable = true;
package = hydra.packages.x86_64-linux.hydra;
hydraURL = cfg.baseURL;
dbi = "dbi:Pg:dbname=hydra;user=hydra;";
useSubstitutes = true;
notificationSender = "hydra@kanata.network";
listenHost = "localhost";
port = 4004;
};
modules.persistence.directories = [
"/var/lib/hydra"
];
nix.settings.allowed-uris = [ "github:" "https://" "http://" "git+http://" "git+https://" ];
};
}
|