feat: fw speed up builds

This commit is contained in:
2025-10-23 02:30:00 +02:00
parent 439a580dfe
commit 399f67ba25
2 changed files with 19 additions and 3 deletions

View File

@@ -107,7 +107,21 @@
]; ];
nix = { 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 = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
@@ -123,8 +137,8 @@
services.tlp = { services.tlp = {
enable = true; enable = true;
settings = { settings = {
CPU_SCALING_GOVERNOR_ON_AC = "powersave"; # powersave or performance CPU_SCALING_GOVERNOR_ON_AC = "performance"; # powersave or performance
CPU_ENERGY_PERF_POLICY_ON_AC = "power"; # power or performance CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; # power or performance
# CPU_MIN_PERF_ON_AC = 0; # CPU_MIN_PERF_ON_AC = 0;
# CPU_MAX_PERF_ON_AC = 100; # max 100 # CPU_MAX_PERF_ON_AC = 100; # max 100
}; };

View File

@@ -2,6 +2,8 @@
{ {
imports = [ (builtins.fetchGit { imports = [ (builtins.fetchGit {
url = "https://github.com/astro/microvm.nix"; url = "https://github.com/astro/microvm.nix";
ref = "main";
rev = "42628f7c61b02d385ce2cb1f66f9be333ac20140";
} + "/nixos-modules/host") ]; } + "/nixos-modules/host") ];
systemd.network.networks."31-server".matchConfig.Name = [ "vm-*" ]; systemd.network.networks."31-server".matchConfig.Name = [ "vm-*" ];