nixos-config/modules/common/nix.nix
2024-04-11 20:33:12 +02:00

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