nixos-config/modules/common/nix.nix

27 lines
495 B
Nix
Raw Normal View History

{ 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;
};
}