24 lines
623 B
Nix
24 lines
623 B
Nix
{ inputs, lib, ... }:
|
|
|
|
{
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
trusted-users = [ "root" "@wheel" ];
|
|
};
|
|
|
|
# Garbage-collect old generations weekly.
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 14d";
|
|
};
|
|
|
|
# Make `nix run nixpkgs#...` use the same nixpkgs as the system,
|
|
# and pin the legacy channel to the flake input so nix-shell stays consistent.
|
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
nix.nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
}
|