From 399f67ba25029de1e1e900a7e29f10944960836c Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Thu, 23 Oct 2025 02:30:00 +0200 Subject: [PATCH 1/2] feat: fw speed up builds --- hosts/fw/configuration.nix | 20 +++++++++++++++++--- hosts/fw/modules/microvm.nix | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index b9e4a9a..c682909 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -107,7 +107,21 @@ ]; nix = { - settings.auto-optimise-store = true; + settings = { + auto-optimise-store = true; + # Build performance optimizations + max-jobs = 4; + cores = 4; + # Enable eval caching for faster rebuilds + eval-cache = true; + # Use binary caches to avoid unnecessary rebuilds + substituters = [ + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; gc = { automatic = true; dates = "weekly"; @@ -123,8 +137,8 @@ services.tlp = { enable = true; settings = { - CPU_SCALING_GOVERNOR_ON_AC = "powersave"; # powersave or performance - CPU_ENERGY_PERF_POLICY_ON_AC = "power"; # power or performance + CPU_SCALING_GOVERNOR_ON_AC = "performance"; # powersave or performance + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; # power or performance # CPU_MIN_PERF_ON_AC = 0; # CPU_MAX_PERF_ON_AC = 100; # max 100 }; diff --git a/hosts/fw/modules/microvm.nix b/hosts/fw/modules/microvm.nix index 30ee742..1270ac9 100644 --- a/hosts/fw/modules/microvm.nix +++ b/hosts/fw/modules/microvm.nix @@ -2,6 +2,8 @@ { imports = [ (builtins.fetchGit { url = "https://github.com/astro/microvm.nix"; + ref = "main"; + rev = "42628f7c61b02d385ce2cb1f66f9be333ac20140"; } + "/nixos-modules/host") ]; systemd.network.networks."31-server".matchConfig.Name = [ "vm-*" ]; From eccac4d4a213935419ee4eb6db30f2c8764c093b Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Thu, 23 Oct 2025 02:30:09 +0200 Subject: [PATCH 2/2] feat: gitea runner cache config --- hosts/fw/modules/gitea-vm.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/fw/modules/gitea-vm.nix b/hosts/fw/modules/gitea-vm.nix index 33155cb..734f306 100644 --- a/hosts/fw/modules/gitea-vm.nix +++ b/hosts/fw/modules/gitea-vm.nix @@ -62,6 +62,11 @@ in { container = { network = "podman"; }; + cache = { + enabled = true; + host = "${config.networkPrefix}.97.5${toString idx}"; # LAN IP of the machine running act_runner + port = 8088; # any free TCP port + }; }; };