diff --git a/flake.nix b/flake.nix index 9ed70c2..41abd00 100644 --- a/flake.nix +++ b/flake.nix @@ -285,7 +285,7 @@ #hostname "domain" "system" inputs "state" [ modules ... ] noximilien = mk "pbsds.net" "x86_64-linux" inputs-2311 "22.11" [ au intel ]; brumlebasse = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au amd nspawn ]; - nord = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel-novga hw.common-cpu-intel-sandy-bridge rocm hidpi ]; + nord = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel-novga hw_.common-cpu-intel-sandy-bridge rocm hidpi ]; sopp = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au nixld intel cuda p1005 ]; bjarte = mk "pbsds.net" "x86_64-linux" inputs-2405 "23.11" [ nixld intel hw.lenovo-thinkpad-x1-7th-gen ]; bolle = mk "pbsds.net" "x86_64-linux" inputs-2405 "23.11" [ au dns64 intel ]; diff --git a/overlay.nix b/overlay.nix index 76affba..9403209 100644 --- a/overlay.nix +++ b/overlay.nix @@ -20,8 +20,9 @@ rec { ]; }; - micro = prev.micro.override { - wl-clipboard = wl-clipboard-timeout; - }; - + micro = if prev.micro.override.__functionArgs ? wl-clipboard + then prev.micro.override { + wl-clipboard = wl-clipboard-timeout; + } + else prev.micro; } diff --git a/profiles/lix.nix b/profiles/lix.nix index cd0860e..df88e19 100644 --- a/profiles/lix.nix +++ b/profiles/lix.nix @@ -3,5 +3,5 @@ # https://lix.systems/add-to-config/ { - nix.package = pkgs.lix; + nix.package = lib.mkIf (pkgs ? lix) pkgs.lix; } diff --git a/profiles/remote-builders.nix b/profiles/remote-builders.nix index cb8895c..08fe54b 100644 --- a/profiles/remote-builders.nix +++ b/profiles/remote-builders.nix @@ -19,6 +19,7 @@ let thisHost = hosts.${config.networking.fqdn}; thisHostIsBuilder = thisHost.maxJobs > 0; thisHostIsHopHost = builtins.elem config.networking.fqdn (lib.forEach hosts (host: host.ssh.proxyJump or null)); + thisHostIsConsumer = thisHost.ssh ? userPublicKey; mkRemoteConfig = fqdn: let host = hosts.${fqdn}; @@ -32,13 +33,13 @@ let isThis = fqdn == config.networking.fqdn; in mkIf (!isThis) ( lib.mkMerge [ # out - (lib.mkIf isBuilder { + (lib.mkIf (isBuilder && thisHostIsConsumer) { nix.buildMachines = [ buildMachine ]; }) # out or jump - (lib.mkIf (host.ssh ? listenPublicKey) { + (lib.mkIf (host.ssh ? listenPublicKey && thisHostIsConsumer) { programs.ssh.knownHosts.${fqdn}.publicKey = host.ssh.listenPublicKey; # timeouts are great when remote is unresponsive. nix doesn't care