[Nix] always use latest nix + micro-optimize it

This commit is contained in:
Antoine Viallon 2024-03-11 00:06:57 +01:00
parent 0729404d27
commit c548c42662
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
2 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,8 @@ let
cfg = config.aviallon.nix;
generalCfg = config.aviallon.general;
desktopCfg = config.aviallon.desktop;
optimizeCfg = config.aviallon.optimizations;
optimizePkg = optimizeCfg.optimizePkg;
in
{
options.aviallon.nix = {
@ -83,7 +85,7 @@ in
};
nix.package = mkIf (strings.versionOlder pkgs.nix.version "2.7") pkgs.nix_2_7;
nix.package = optimizePkg { lto = true; level = "slower"; } pkgs.nix;
nix.settings.system-features = [ "big-parallel" "kvm" "benchmark" ]
++ optional ( ! isNull generalCfg.cpu.arch ) "gccarch-${generalCfg.cpu.arch}"

View file

@ -52,7 +52,7 @@ in
ripgrep
fd
htop
cachix
unstable.cachix
usbutils
]
++ optionals (!generalCfg.minimal) [