27 lines
495 B
Nix
27 lines
495 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;
|
|
};
|
|
}
|