Extract configuration to own module

This commit is contained in:
Alexander Kobjolke 2024-01-20 17:41:14 +01:00
parent 9ce6478c7b
commit fbb85bc1da
3 changed files with 31 additions and 29 deletions

22
modules/nix-config.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
warn-dirty = false;
# avoid unwanted garbage collection when using direnv
keep-outputs = true;
keep-derivations = true;
};
};
}