forked from pub-solar/os
Fix CI runner, get secrets from file
This commit is contained in:
parent
f4eb615954
commit
7542014d33
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, pkgs, self, ... }:
|
||||
with lib;
|
||||
let
|
||||
psCfg = config.pub-solar;
|
||||
|
@ -10,18 +10,26 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.ci-runner = {
|
||||
systemd.services.ci-runner = {
|
||||
enable = true;
|
||||
|
||||
description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM.";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
script = ''${pkgs.drone-runner-exec}'';
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "libvirtd.service" ];
|
||||
|
||||
script = ''${pkgs.drone-runner-exec}/bin/drone-runner-exec daemon /run/agenix/drone-runner-exec-config'';
|
||||
};
|
||||
|
||||
age.secrets."drone-runner-exec-config" = {
|
||||
file = "${self}/secrets/drone-runner-exec-config";
|
||||
mode = "700";
|
||||
owner = "root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue