aboutsummaryrefslogtreecommitdiff
path: root/app/drone-ci
diff options
context:
space:
mode:
Diffstat (limited to 'app/drone-ci')
-rw-r--r--app/drone-ci/build/machine-config.nix8
-rw-r--r--app/drone-ci/deploy/runner-vm.hcl7
2 files changed, 7 insertions, 8 deletions
diff --git a/app/drone-ci/build/machine-config.nix b/app/drone-ci/build/machine-config.nix
index e1d24a1..73d3f09 100644
--- a/app/drone-ci/build/machine-config.nix
+++ b/app/drone-ci/build/machine-config.nix
@@ -42,9 +42,13 @@ with lib;
virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
- systemd.user.services.drone_nix_setup = {
+ systemd.services.drone_nix_setup = {
+ enable = true;
+ path = [
+ pkgs.docker
+ ];
script = ''
- docker run --rm -it -v /var/lib/drone/nix:/mnt nixpkgs/nix:nixos-21.05 cp -r /nix/{store,var} /mnt/
+ docker run --rm -v /var/lib/drone/nix:/mnt nixpkgs/nix:nixos-21.05 cp -r /nix/{store,var} /mnt/
'';
wantedBy = [ "multi-user.target" ];
};
diff --git a/app/drone-ci/deploy/runner-vm.hcl b/app/drone-ci/deploy/runner-vm.hcl
index 5271b05..7c3a7e2 100644
--- a/app/drone-ci/deploy/runner-vm.hcl
+++ b/app/drone-ci/deploy/runner-vm.hcl
@@ -9,12 +9,6 @@ job "drone-runner" {
}
}
- constraint {
- attribute = "${attr.unique.hostname}"
- operator = "="
- value = "caribou"
- }
-
task "drone-runner-vm" {
driver = "qemu"
@@ -25,6 +19,7 @@ job "drone-runner" {
"-drive", "index=1,file=fat:rw:/var/lib/nomad/alloc/${NOMAD_ALLOC_ID}/${NOMAD_TASK_NAME}/secrets,format=raw,media=disk",
"-device", "e1000,netdev=user.0",
"-netdev", "user,id=user.0,hostfwd=tcp::${NOMAD_PORT_ssh}-:22",
+ "-smp", "2",
]
port_map {
ssh = 22