about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-13 15:36:40 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-13 15:36:40 -0700
commit0b5365ef40526b9b8cb80a0e01451465164d4ed8 (patch)
tree17ff97734bfdfae2d765d449e87edd44fb34da00
parentdrone: initial attempt at configuring it (diff)
downloadworld-0b5365ef40526b9b8cb80a0e01451465164d4ed8.tar.gz
drone: configuration fixes
-rw-r--r--hosts/tahoe/services.nix2
-rw-r--r--modules/services/drone/default.nix2
-rw-r--r--modules/services/drone/server/default.nix7
3 files changed, 8 insertions, 3 deletions
diff --git a/hosts/tahoe/services.nix b/hosts/tahoe/services.nix
index a3533da..b1ed33f 100644
--- a/hosts/tahoe/services.nix
+++ b/hosts/tahoe/services.nix
@@ -27,7 +27,7 @@ in {
     drone = {
       enable = true;
       vhostName = "drone.fcuny.xyz";
-      runners = [ "docker" "exec" ];
+      runners = [ "docker" ];
       sharedSecretFile = secrets."drone/secrets".path;
     };
     rclone = { enable = true; };
diff --git a/modules/services/drone/default.nix b/modules/services/drone/default.nix
index 352ee3d..dedf120 100644
--- a/modules/services/drone/default.nix
+++ b/modules/services/drone/default.nix
@@ -20,7 +20,7 @@
     };
     admin = mkOption {
       type = types.str;
-      default = "ambroisie";
+      default = "fcuny";
       example = "admin";
       description = "Name of the admin user";
     };
diff --git a/modules/services/drone/server/default.nix b/modules/services/drone/server/default.nix
index 199aa47..9c1d1a1 100644
--- a/modules/services/drone/server/default.nix
+++ b/modules/services/drone/server/default.nix
@@ -1,5 +1,7 @@
 { config, lib, pkgs, ... }:
-let cfg = config.my.services.drone;
+let
+  cfg = config.my.services.drone;
+  secrets = config.age.secrets;
 in {
   config = lib.mkIf cfg.enable {
     systemd.services.drone-server = {
@@ -7,6 +9,8 @@ in {
       serviceConfig = {
         EnvironmentFile = [ cfg.sharedSecretFile ];
         Environment = [
+          "DRONE_DATABASE_DRIVER=sqlite3"
+          "DRONE_DATABASE_DATASOURCE=/var/lib/drone-server/drone.sqlite"
           "DRONE_SERVER_HOST=${cfg.vhostName}"
           "DRONE_SERVER_PROTO=https"
           "DRONE_SERVER_PORT=:${toString cfg.port}"
@@ -14,6 +18,7 @@ in {
           "DRONE_JSONNET_ENABLED=true"
           "DRONE_STARLARK_ENABLED=true"
         ];
+        StateDirectory = "drone-server";
         ExecStart = "${pkgs.drone}/bin/drone-server";
         User = "drone";
         Group = "drone";