45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
nix = {
|
|
# nix settings
|
|
settings = {
|
|
# enable flakes and nix-command
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
# auto-optimize my nix-store
|
|
auto-optimise-store = true;
|
|
# use all cores
|
|
max-jobs = "auto";
|
|
# use all available cores per job
|
|
cores = 0;
|
|
# add trusted substituters (binary caches)
|
|
substituters = [
|
|
"https://cache.nixos.org"
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
# add keys
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
|
|
# enable automatic garbage collection
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
};
|
|
|
|
# links /libexec from derivations to /run/current-system/sw
|
|
environment.pathsToLink = [ "/libexec" ];
|
|
# set the default editor to vim
|
|
environment.variables.EDITOR = "vim";
|
|
|
|
# enable home-manager globally
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "backup";
|
|
}
|