create single function to optimize for system
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -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 =
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user