2021-07-26 02:15:44 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
port = 3030;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
|
|
|
"drone.io"
|
2021-07-26 02:55:35 +02:00
|
|
|
"drone-runner-exec"
|
2021-07-26 02:15:44 +02:00
|
|
|
];
|
2021-07-26 02:55:35 +02:00
|
|
|
|
2021-07-26 02:15:44 +02:00
|
|
|
services.drone-server = {
|
|
|
|
enable = true;
|
|
|
|
env = [
|
2021-07-26 02:18:54 +02:00
|
|
|
"DRONE_USER_CREATE=username:raito,admin:true,machine:false"
|
2021-07-26 02:15:44 +02:00
|
|
|
];
|
|
|
|
envFile = config.age.secrets.droneKeyFile.path;
|
|
|
|
inherit port;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."drone.rz.ens.wtf" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${toString port}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|