Merge branch 'feature/ci-runner-onecommit-test' into b12f

This commit is contained in:
Benjamin Bädorf 2022-08-25 15:26:22 +02:00
commit 8a5064fbf5
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
6 changed files with 46 additions and 2 deletions

View file

@ -40,6 +40,7 @@ in
owner = psCfg.user.name;
};
pub-solar.sway.vnc.enable = true;
pub-solar.ci-runner.enable = true;
home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable {
"sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf;

View file

@ -0,0 +1,41 @@
{ lib, config, pkgs, self, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.ci-runner;
in
{
options.pub-solar.ci-runner = {
enable = mkEnableOption "Enables a systemd service that runs drone-ci-runner";
};
config = mkIf cfg.enable {
systemd.user.services.ci-runner = {
enable = true;
description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM.";
serviceConfig = {
Type = "simple";
Restart = "always";
};
path = [
pkgs.git
pkgs.nix
pkgs.libvirt
];
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 = psCfg.user.name;
};
};
}

View file

@ -6,7 +6,7 @@ self: with self; ''
--env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \
--env=DRONE_RPC_HOST=$DRONE_RPC_HOST \
--env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \
--env=DRONE_RUNNER_CAPACITY=4 \
--env=DRONE_RUNNER_CAPACITY=8 \
--env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \
--publish=30010:30010 \
--restart=always \

Binary file not shown.

View file

@ -52,6 +52,8 @@ in
"vnc-cert-chocolatebar.pem".publicKeys = chocolatebarKeys;
"vnc-key-chocolatebar.pem".publicKeys = chocolatebarKeys;
"drone-runner-exec-config".publicKeys = allKeys;
"dyndns-droppie.key".publicKeys = droppieKeys;
"mopidy.conf".publicKeys = allKeys;

View file

@ -103,7 +103,7 @@ in
mode = "700";
owner = "mopidy";
};
services.mopidy.extraConfigFiles = [ "/run/secrets/mopidy.conf" ];
services.mopidy.extraConfigFiles = [ "/run/agenix/mopidy.conf" ];
programs.ssh.extraConfig = "
PubkeyAcceptedKeyTypes +ssh-rsa