24 lines
610 B
Nix
24 lines
610 B
Nix
{ config, lib, pkgs, unstable, ... }:
|
|
{
|
|
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
|
type = with lib.types; listOf str;
|
|
};
|
|
|
|
config = {
|
|
nix = {
|
|
package = lib.mkForce pkgs.nix;
|
|
settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
registry.unstable.flake = unstable;
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|
|
}
|