nix: share builder setup across machines

This commit is contained in:
Primrose 2024-08-16 22:51:43 +02:00
parent 7919ce882d
commit 8024315063
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
5 changed files with 5 additions and 11 deletions

View file

@ -119,6 +119,7 @@ in
bismuth = {
system = "aarch64-darwin";
modules = [
self.nixosModules.builders
{
home-manager.users.leana = {
programs.neovim.extraLangServers.enable = true;
@ -175,6 +176,7 @@ in
inputs.disko.nixosModules.default
self.diskoConfigurations.carbon
self.nixosModules.zram
self.nixosModules.builders
{
home-manager.users.leana = {
imports = [

View file

@ -1,62 +0,0 @@
{
nix.distributedBuilds = true;
# NOTE:
# https://github.com/NixOS/hydra/issues/584#issuecomment-1901289182
# use ssh-ng to "fix" not trusted user issue
nix.buildMachines =
let
def = {
hostName = throw "hostName is not defined";
system = throw "system is not defined";
protocol = "ssh";
sshUser = "nix-remote-builder";
speedFactor = 1;
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
mandatoryFeatures = [ ];
};
# carbon = def // {
# hostName = "carbon";
# system = "x86_64-linux";
# speedFactor = 4;
# };
builder = def // {
hostName = "builder";
system = "x86_64-linux";
speedFactor = 1;
};
hydrogen = def // {
hostName = "hydrogen";
system = "aarch64-linux";
speedFactor = 2;
};
oracle = def // {
hostName = "oracle";
system = "aarch64-linux";
protocol = "ssh-ng";
sshUser = "ubuntu";
speedFactor = 8;
};
in
[
# carbon
builder
hydrogen
oracle
];
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = ''
builders-use-substitutes = true
'';
}

View file

@ -1,7 +1,6 @@
{ pkgs, ... }:
{
imports = [ ./builders.nix ];
{
environment.systemPackages = [
pkgs.vim
pkgs.gnumake