rm fra1-b

This commit is contained in:
2025-07-01 19:10:38 +00:00
parent 6a4149d6ef
commit 21e3076474
13 changed files with 1 additions and 332 deletions

View File

@@ -19,7 +19,6 @@
./ping_exporter
./postfix
./printing
./remote-builder
./ssh8022
./syncthing
./syncthing-relay

View File

@@ -33,7 +33,6 @@ in
"github.com"
"jakstys.lt"
"fra1-b.jakstys.lt"
"fra1-c.jakstys.lt"
"vno3-nk.jakst.vpn"

View File

@@ -1,72 +0,0 @@
{ config, lib, ... }:
{
options.mj.services.remote-builder = with lib.types; {
server = {
enable = lib.mkEnableOption "Enable remote builder server";
uidgid = lib.mkOption { type = int; };
sshAllowSubnet = lib.mkOption { type = str; };
publicKeys = lib.mkOption { type = listOf str; };
};
client = {
enable = lib.mkEnableOption "Enable remote builder client";
system = lib.mkOption {
type = enum [
"aarch64-linux"
"x86_64-linux"
];
};
hostName = lib.mkOption { type = str; };
sshKey = lib.mkOption { type = path; };
supportedFeatures = lib.mkOption { type = listOf str; };
maxJobs = lib.mkOption {
type = int;
default = 1;
};
};
};
config = lib.mkMerge [
(
let
cfg = config.mj.services.remote-builder.server;
in
lib.mkIf cfg.enable {
users.users.remote-builder = {
description = "Remote Builder";
home = "/var/lib/remote-builder";
shell = "/bin/sh";
group = "remote-builder";
isSystemUser = true;
createHome = true;
uid = cfg.uidgid;
openssh.authorizedKeys.keys = map (k: ''from="${cfg.sshAllowSubnet}" ${k}'') cfg.publicKeys;
};
users.groups.remote-builder.gid = cfg.uidgid;
nix.settings.trusted-users = [ "remote-builder" ];
}
)
(
let
cfg = config.mj.services.remote-builder.client;
in
lib.mkIf cfg.enable {
nix = {
buildMachines = [
{
inherit (cfg)
hostName
system
sshKey
supportedFeatures
;
protocol = "ssh-ng";
sshUser = "remote-builder";
}
];
distributedBuilds = true;
extraOptions = "builders-use-substitutes = true";
};
}
)
];
}

View File

@@ -33,12 +33,6 @@
Host fra1-c
HostName fra1-c.jakstys.lt
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
Host fra1-b.jakstys.lt jakstys.lt
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
Host fra1-b
HostName fra1-b.jakstys.lt
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
'';
}
)