From ac756d25fa4cdf7ff04cd5fc1a71275522aadd39 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Tue, 9 Jul 2024 15:59:58 -0400 Subject: [PATCH] Hippocampus: Remove Unused Deploy Machines TODO: Replace the deployment with microvms similar to how it's implemented in https://gitea.c3d2.de/c3d2 --- machines/hippocampus/servers/public/hydra.nix | 44 +------------------ 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/machines/hippocampus/servers/public/hydra.nix b/machines/hippocampus/servers/public/hydra.nix index 1feaf40..71e3d7d 100644 --- a/machines/hippocampus/servers/public/hydra.nix +++ b/machines/hippocampus/servers/public/hydra.nix @@ -1,14 +1,4 @@ {config, pkgs, ...}: let - deploy-container = pkgs.writeScriptBin "deploy-nixos-container" '' - pushd $2 - nixos-container update $1 --flake $2#$3 - git reset --hard HEAD - git clean -fdx - git reflog expire --expire=now --all - git repack -ad # Remove dangling objects from packfiles - git prune # Remove dangling loose objects - popd - ''; in { imports = [ # ./nix-serve.nix @@ -42,39 +32,7 @@ in { ]; }; - # Deployment User - users.users.hydra-deploy = { - isNormalUser = true; - home = "/var/lib/hydra/deploy"; - description = "Hydra Deployment User"; - extraGroups = [ "hydra" ]; - packages = [ - deploy-container - ]; - }; - # TODO: Configure authorizedKeys between - # hydra-queue-runner and hydra-deploy - security.sudo.extraRules = [ - { - users = ["hydra-deploy"]; - commands = [ - { - command = "${deploy-container}/bin/deploy-nixos-container *"; - options = ["NOPASSWD"]; - } - ]; - } - ]; - networking.nat = { - enable = true; - internalInterfaces = [ - "ve-newalan" - "ve-handyhelper" - ]; - externalInterface = "enp0s25"; - enableIPv6 = true; - }; - + nix.buildMachines = [ { hostName = "localhost"; system = "x86_64-linux";