Payas Relekar
d88376a37c
Nix development has picked up pace again in past few months, and stable versions include 'experimental features' that can be enabled behind feature flags. So, it is no longer necessary to keep using the unstable version which occasionally can bring unwanted surprises.
23 lines
549 B
Nix
23 lines
549 B
Nix
{ config, lib, options, pkgs, ... }:
|
|
{
|
|
nix = {
|
|
# Enable Flakes systemwide, and set gc-roots for nix-direnv
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes ca-derivations
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
|
|
# Automated gabrage collection
|
|
gc = {
|
|
automatic = true;
|
|
dates = "20:30";
|
|
options = "--delete-older-than 5d";
|
|
};
|
|
|
|
# Auto-optimize nix-store, create hard-links to save space on /nix/store
|
|
settings = {
|
|
auto-optimise-store = true;
|
|
};
|
|
};
|
|
}
|