{
  lib,
  config,
  pkgs,
  vars,
  ...
}:
let
  cfg = config.unfree;
in
{
  options = {
    unfree = {
      enable = lib.mkEnableOption "Enable unfree in NixOS";
    };
  };
  config = lib.mkIf cfg.enable {
    nixpkgs.config.allowUnfree = true;
  };
}