about summary refs log tree commit diff
path: root/modules/services/drone/default.nix
blob: dedf120c3a45bff43da635cf0a47e3adc320adfc (plain) (blame)
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
39
# A docker-based CI/CD system
#
# Inspired by [1]
# [1]: https://github.com/Mic92/dotfiles/blob/master/nixos/eve/modules/drone.nix
{ lib, ... }: {
  imports = [ ./runner-docker ./runner-exec ./server ];

  options.my.services.drone = with lib; {
    enable = mkEnableOption "Drone CI";
    vhostName = mkOption {
      type = types.str;
      example = "drone.fcuny.net";
      description = "Name for the virtual host";
    };
    runners = mkOption {
      type = with types; listOf (enum [ "exec" "docker" ]);
      default = [ ];
      example = [ "exec" "docker" ];
      description = "Types of runners to enable";
    };
    admin = mkOption {
      type = types.str;
      default = "fcuny";
      example = "admin";
      description = "Name of the admin user";
    };
    port = mkOption {
      type = types.port;
      default = 3030;
      example = 8080;
      description = "Internal port of the Drone UI";
    };
    sharedSecretFile = mkOption {
      type = types.str;
      example = "/run/secrets/drone-rpc.env";
      description = "Shared RPC secret to inject into server and runners";
    };
  };
}