{ config, lib, pkgs, ... }: let cfg = config.orbekk.builder; in { options = { orbekk.builder = { enableRemoteBuilds = lib.mkEnableOption "Enable building on remote server"; }; }; config = lib.mkIf cfg.enableRemoteBuilds { nix.buildMachines = [ { sshUser = "builder"; hostName = "dragon.orbekk.com"; systems = ["x86_64-linux" "i686-linux" ]; maxJobs = 2; speedFactor = 2; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; mandatoryFeatures = [ ]; }] ; nix.distributedBuilds = true; # optional, useful when the builder has a faster internet connection than yours # nix.extraOptions = '' # builders-use-substitutes = true # ''; }; }