This repository has been archived on 2024-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
nixos/nix.nix
Payas Relekar d88376a37c Switch to stable version of Nix
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.
2022-03-08 23:58:44 +05:30

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;
};
};
}