Compare commits

...

4 Commits

Author SHA1 Message Date
3d535d13c0 hippocampus: Allow hydra build riscv 2024-07-12 00:04:02 -04:00
2f588ab322 Merge branch 'main' of https://git.syzygial.cc/Syzygial/NixMachines 2024-07-11 23:59:43 -04:00
8f657ef0de Hippocampus: Remove Unused Deploy Machines
TODO: Replace the deployment with microvms similar to how it's
implemented in https://gitea.c3d2.de/c3d2
2024-07-09 15:59:58 -04:00
57dc4e26a5 Hippocampus: RISC-V typo 2024-07-07 11:48:12 -04:00
2 changed files with 6 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, ... ]: {
{ config, pkgs, lib, ... }: {
boot.binfmt.emulatedSystems = [
"riscv64-linux"
];

View File

@@ -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,42 +32,13 @@ 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";
systems = [
"x86_64-linux"
"riscv64-linux"
];
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
maxJobs = 8;
}