Limit nix build

This commit is contained in:
Fern Garden 2025-08-10 16:29:44 +08:00
parent 83bb9ac090
commit ad9b895ef0

View file

@ -9,14 +9,23 @@ with lib; {
# NixOS version. # NixOS version.
system.stateVersion = "25.05"; system.stateVersion = "25.05";
# Enable flakes. # nix config.
nix.settings.experimental-features = [ nix = {
"nix-command" # Set $NIX_PATH.
"flakes" nixPath = ["nixpkgs=${inputs.nixpkgs}"];
];
# Set $NIX_PATH. settings = {
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"]; # Enable flakes.
experimental-features = [
"nix-command"
"flakes"
];
# Limit nix build.
cores = 2;
max-jobs = 2;
};
};
# Enable redistributable firmware. # Enable redistributable firmware.
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
@ -60,9 +69,7 @@ with lib; {
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
description = "Fern Garden"; description = "Fern Garden";
extraGroups = [ extraGroups = ["wheel"];
"wheel"
];
}; };
# Use fish shell # Use fish shell