diff options
author | Franck <franck@fcuny.net> | 2022-11-07 08:09:25 -0800 |
---|---|---|
committer | Franck <franck@fcuny.net> | 2022-11-07 08:09:25 -0800 |
commit | bb7025da134fef21f4ccafee74a75428b56a27de (patch) | |
tree | 6e0ff5e7b3ee7367d1fedbf57a407040b8b8ec49 /modules/services/drone/default.nix | |
parent | ref(home/git): update mapping for the git-helper (diff) | |
parent | fix(services/drone): enable drone (diff) | |
download | world-bb7025da134fef21f4ccafee74a75428b56a27de.tar.gz |
Merge pull request 'fcuny/ci-drone' (#1) from fcuny/test-woodpecker into main
Reviewed-on: https://git.fcuny.net/fcuny/world/pulls/1
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..dedf120 --- /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 = "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"; + }; + }; +} |