create single function to optimize for system

This commit is contained in:
2025-04-07 14:33:34 -04:00
parent b764d2de45
commit 3653e06c7d
2 changed files with 14 additions and 10 deletions

View File

@@ -135,7 +135,7 @@
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
specialArgs = {
specialArgs = rec {
inherit
username
hostname
@@ -160,6 +160,14 @@
# stdenv = pkgs.clang19Stdenv;
}
);
optimizePackage =
pkg:
optimizeWithFlags pkg [
"-O3"
"-march=znver2"
"-mtune=znver2"
];
};
modules =
[