2021-01-03 16:28:35 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.sbruder.unfree;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# Options that affect multiple modules
|
|
|
|
options.sbruder = {
|
|
|
|
unfree = {
|
|
|
|
allowAssets = lib.mkOption {
|
|
|
|
default = true;
|
|
|
|
type = lib.types.bool;
|
|
|
|
description = "Allow restricted selection of unfree assets to be installed.";
|
|
|
|
};
|
|
|
|
allowSoftware = lib.mkOption {
|
|
|
|
default = false;
|
|
|
|
type = lib.types.bool;
|
|
|
|
description = "Allow restricted selection of unfree software to be installed.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2021-02-27 19:55:12 +01:00
|
|
|
nixpkgs.config.allowUnfreePredicate = (pkg: lib.elem (lib.getName pkg) (
|
2021-01-03 16:28:35 +01:00
|
|
|
lib.optionals cfg.allowAssets [
|
|
|
|
"corefonts"
|
|
|
|
"vista-fonts"
|
|
|
|
"wallpaper-unfree" # defined in users/simon/modules/sway.nix
|
2021-07-26 20:43:52 +02:00
|
|
|
"yuzu-ea"
|
|
|
|
"yuzu-mainline" # derivation of icons is not allowed
|
2021-01-03 16:28:35 +01:00
|
|
|
] ++ lib.optionals cfg.allowSoftware [
|
2021-07-04 20:51:28 +02:00
|
|
|
"cups-kyocera-ecosys-m552x-p502x" # exception: the file header says MIT license, but explicitly forbids modifications WTF?
|
2021-04-03 18:47:01 +02:00
|
|
|
"drone-runner-exec" # exception: same as drone.io
|
|
|
|
"drone.io" # exception: is open source (but has usage restriction)
|
|
|
|
"fahclient" # exception: for science
|
2021-01-07 18:29:18 +01:00
|
|
|
"osu-lazer" # exception: is mostly free (just has one unfree dependency) and runs in container
|
2021-01-03 16:28:35 +01:00
|
|
|
"p7zip" # exception: rar source code is not free, but available; p7zip with `enableUnfree` includes it
|
|
|
|
]
|
|
|
|
));
|
|
|
|
};
|
|
|
|
}
|