23.11 compat

This commit is contained in:
Peder Bergebakken Sundt 2024-07-10 01:12:00 +02:00
parent f9b4345938
commit eccd7f0fde
4 changed files with 10 additions and 8 deletions

View File

@ -285,7 +285,7 @@
#hostname "domain" "system" inputs "state" [ modules ... ] #hostname "domain" "system" inputs "state" [ modules ... ]
noximilien = mk "pbsds.net" "x86_64-linux" inputs-2311 "22.11" [ au intel ]; 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 ]; 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 ]; 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 ]; 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 ]; bolle = mk "pbsds.net" "x86_64-linux" inputs-2405 "23.11" [ au dns64 intel ];

View File

@ -20,8 +20,9 @@ rec {
]; ];
}; };
micro = prev.micro.override { micro = if prev.micro.override.__functionArgs ? wl-clipboard
wl-clipboard = wl-clipboard-timeout; then prev.micro.override {
}; wl-clipboard = wl-clipboard-timeout;
}
else prev.micro;
} }

View File

@ -3,5 +3,5 @@
# https://lix.systems/add-to-config/ # https://lix.systems/add-to-config/
{ {
nix.package = pkgs.lix; nix.package = lib.mkIf (pkgs ? lix) pkgs.lix;
} }

View File

@ -19,6 +19,7 @@ let
thisHost = hosts.${config.networking.fqdn}; thisHost = hosts.${config.networking.fqdn};
thisHostIsBuilder = thisHost.maxJobs > 0; thisHostIsBuilder = thisHost.maxJobs > 0;
thisHostIsHopHost = builtins.elem config.networking.fqdn (lib.forEach hosts (host: host.ssh.proxyJump or null)); thisHostIsHopHost = builtins.elem config.networking.fqdn (lib.forEach hosts (host: host.ssh.proxyJump or null));
thisHostIsConsumer = thisHost.ssh ? userPublicKey;
mkRemoteConfig = fqdn: let mkRemoteConfig = fqdn: let
host = hosts.${fqdn}; host = hosts.${fqdn};
@ -32,13 +33,13 @@ let
isThis = fqdn == config.networking.fqdn; isThis = fqdn == config.networking.fqdn;
in mkIf (!isThis) ( lib.mkMerge [ in mkIf (!isThis) ( lib.mkMerge [
# out # out
(lib.mkIf isBuilder { (lib.mkIf (isBuilder && thisHostIsConsumer) {
nix.buildMachines = [ buildMachine ]; nix.buildMachines = [ buildMachine ];
}) })
# out or jump # out or jump
(lib.mkIf (host.ssh ? listenPublicKey) { (lib.mkIf (host.ssh ? listenPublicKey && thisHostIsConsumer) {
programs.ssh.knownHosts.${fqdn}.publicKey = host.ssh.listenPublicKey; programs.ssh.knownHosts.${fqdn}.publicKey = host.ssh.listenPublicKey;
# timeouts are great when remote is unresponsive. nix doesn't care # timeouts are great when remote is unresponsive. nix doesn't care