core-services-01(services): add Drone Server CI/CD for initial experiments

This commit is contained in:
Raito Bezarius 2021-07-26 02:15:44 +02:00
parent 1c77fddc2c
commit 11298e3363
7 changed files with 30 additions and 1 deletions

View file

@ -0,0 +1,25 @@
{ config, lib, ... }:
let
port = 3030;
in
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"drone.io"
];
services.drone-server = {
enable = true;
env = [
"DRONE_USER_CREATE=username:rz,admin:true"
];
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}";
};
};
}

View file

@ -5,6 +5,7 @@ let
port = 3000; port = 3000;
in in
{ {
imports = [ ./drone.nix ];
services.gitea = { services.gitea = {
enable = true; enable = true;
domain = "git.${my.subZone}"; domain = "git.${my.subZone}";

View file

@ -14,7 +14,7 @@
"klubrz-nur": { "klubrz-nur": {
"branch": "main", "branch": "main",
"repo": "https://git.rz.ens.wtf/Klub-RZ/nur", "repo": "https://git.rz.ens.wtf/Klub-RZ/nur",
"rev": "48597e362c87365976ebc0168fb0e5678aa3865d", "rev": "a567fa82ffcde61719c5409c472360eaee7b9611",
"type": "git" "type": "git"
}, },
"niv": { "niv": {

View file

@ -2,4 +2,5 @@
{ {
age.secrets.keycloakDatabasePasswordFile.file = ./keycloakDatabasePasswordFile.age; age.secrets.keycloakDatabasePasswordFile.file = ./keycloakDatabasePasswordFile.age;
age.secrets.oauth2ProxyKeyFile.file = ./oauth2ProxyKeyFile.age; age.secrets.oauth2ProxyKeyFile.file = ./oauth2ProxyKeyFile.age;
age.secrets.droneKeyFile.file = ./droneKeyFile.age;
} }

Binary file not shown.

View file

@ -9,5 +9,6 @@ in
{ {
"keycloakDatabasePasswordFile.age".publicKeys = superadmins ++ systems; "keycloakDatabasePasswordFile.age".publicKeys = superadmins ++ systems;
"oauth2ProxyKeyFile.age".publicKeys = superadmins ++ systems; "oauth2ProxyKeyFile.age".publicKeys = superadmins ++ systems;
"droneKeyFile.age".publicKeys = superadmins ++ systems;
} }

View file

@ -24,6 +24,7 @@ with my.ipv6; # contains { standard, acme }
subdomains = { subdomains = {
git.AAAA = standard; git.AAAA = standard;
drone.AAAA = standard;
wiki.AAAA = standard; wiki.AAAA = standard;
monitoring.AAAA = standard; monitoring.AAAA = standard;
auth.AAAA = standard; auth.AAAA = standard;