diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-04-13 15:20:45 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-04-13 15:20:45 -0700 |
| commit | d95497cf3a7728f4a0d43bf4f54eb4a796ba0870 (patch) | |
| tree | 3df15db490f3da6f83d15e2e732196bb48cb2525 /modules/services/drone/default.nix | |
| parent | nginx: configure correctly the dashboard (diff) | |
| download | infra-d95497cf3a7728f4a0d43bf4f54eb4a796ba0870.tar.gz | |
drone: initial attempt at configuring it
Diffstat (limited to '')
| -rw-r--r-- | modules/services/drone/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/services/drone/default.nix b/modules/services/drone/default.nix new file mode 100644 index 0000000..352ee3d --- /dev/null +++ b/modules/services/drone/default.nix @@ -0,0 +1,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 = "ambroisie"; + 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"; + }; + }; +} |
