nixos/m/unfree.nix
2024-12-17 00:25:43 +03:00

14 lines
329 B
Nix

{ config, lib, ... }:
let
unfree = config.maid.unfree;
types = lib.types;
in
{
options.maid.unfree = lib.mkOption {
type = types.listOf types.str;
description = "unfree software list";
default = [];
};
config.nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.maid.unfree;
}