nixos-config/modules/common/nix.nix

32 lines
503 B
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
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;
};
}