30 lines
711 B
Nix
30 lines
711 B
Nix
{ config, lib, pkgs, unstable, ... }:
|
|
{
|
|
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
|
type = with lib.types; listOf str;
|
|
};
|
|
|
|
config = {
|
|
nix = {
|
|
settings = {
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
auto-optimise-store = true;
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
};
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
|
|
|
|
_module.args.pkgsUnstable = import unstable {
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
inherit (config.nixpkgs) config;
|
|
};
|
|
};
|
|
}
|