diff --git a/hosts/myself/container-runner-qemu.nix b/hosts/myself/container-runner-qemu.nix deleted file mode 100644 index db7597f..0000000 --- a/hosts/myself/container-runner-qemu.nix +++ /dev/null @@ -1,62 +0,0 @@ -inputs: -{ config, pkgs, ... }: -let - extraPackages = with pkgs; [ - curl - gawk - git - packer - pup - (python3.withPackages (p: with p; [ pip pyyaml virtualenv ])) - qemu_full - qemu_kvm - shellcheck - vagrant - xonsh - xorriso - ]; -in { - imports = [ - inputs.agenix.nixosModules.default - ]; - age.identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - age.secrets.qemu-runner-reg-1 = { - file = ../../secrets/gitlab/myself-qemu-runner-reg-1.age; - owner = "root"; - }; - - networking.useHostResolvConf = pkgs.lib.mkForce false; - networking.nameservers = [ "100.100.100.100" ]; - services.resolved.enable = true; - - environment.systemPackages = extraPackages; - - services.gitlab-runner = { - enable = true; - settings.concurrent = 5; - services.shell = { - executor = "shell"; - registrationConfigFile = config.age.secrets.qemu-runner-reg-1.path; - tagList = [ "shell" "qemu" ]; - }; - }; - virtualisation.libvirtd = { - enable = true; - onBoot = "ignore"; - }; - - systemd.services = { - gitlab-runner = { - wants = [ "network-online.target" "systemd-resolved.service" ]; - after = [ "network.target" "network-online.target" "systemd-resolved.service" ]; - }; - libvirtd.serviceConfig = { - DevicePolicy = "auto"; - DeviceAllow = [ "/dev/kvm" "/dev/mem" ]; - PrivateDevices = false; - ProtectKernelModules = false; - }; - }; - - system.stateVersion = "24.05"; -} diff --git a/hosts/myself/container-runner-vbox.nix b/hosts/myself/container-runner.nix similarity index 100% rename from hosts/myself/container-runner-vbox.nix rename to hosts/myself/container-runner.nix diff --git a/hosts/myself/git.nix b/hosts/myself/git.nix index bae55a5..d278b2a 100644 --- a/hosts/myself/git.nix +++ b/hosts/myself/git.nix @@ -107,7 +107,7 @@ in { ]; hostAddress = "192.168.201.1"; localAddress = "192.168.201.2"; - config = ((import ./container-runner-vbox.nix) { + config = ((import ./container-runner.nix) { inherit inputs; name = "qemu"; packages = with pkgs; [ qemu_full qemu_kvm ]; @@ -141,7 +141,7 @@ in { }; hostAddress = "192.168.202.1"; localAddress = "192.168.202.2"; - config = ((import ./container-runner-vbox.nix) { + config = ((import ./container-runner.nix) { inherit inputs; name = "vbox"; extra = { @@ -167,7 +167,7 @@ in { autoStart = true; hostAddress = "192.168.203.1"; localAddress = "192.168.203.2"; - config = ((import ./container-runner-vbox.nix) { + config = ((import ./container-runner.nix) { inherit inputs; name = "shell"; });