32 lines
503 B
Nix
32 lines
503 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
{
|
|
options.allowUnfreePackages = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
example = true;
|
|
description = ''
|
|
Whether the system can use unfree derivations.
|
|
'';
|
|
};
|
|
|
|
config = {
|
|
nix = {
|
|
settings.sandbox = true;
|
|
|
|
package = pkgs.nixVersions.stable;
|
|
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = config.allowUnfreePackages;
|
|
};
|
|
}
|