From 29324c0cd6440382616f6fd84aa82f72484de7a5 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Mon, 10 Mar 2025 10:27:16 +0100 Subject: nixos: nix: remote build: add require option --- modules/nixos/personal/nix.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index 1fd3eec..763d5d1 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -52,9 +52,19 @@ in { default = "ssh-ng"; }; speedFactor = lib.mkOption { - type = lib.types.int; + type = + lib.types.int; default = 4; }; + require = lib.mkOption { + type = + lib.types.bool; + default = true; + description = '' + Whether this remote builder is required to build the configuration. + If so, network connectivity to this remote builder will be checked prior to building. + ''; + }; }; }; }; @@ -192,7 +202,7 @@ in { }; }; - personal.nix.autoUpgrade.checkHosts = lib.mkDefault ["hephaistos.${domain}"]; + personal.nix.autoUpgrade.checkHosts = lib.mkOptionDefault (lib.optional require "hephaistos.${domain}"); programs.ssh = { extraConfig = lib.optionalString enable '' -- cgit v1.2.3