treewide: use packageName

This commit is contained in:
tv 2019-09-04 20:17:56 +02:00
parent 38bf02df0a
commit 856ee03a20
6 changed files with 19 additions and 15 deletions

View File

@ -5,10 +5,11 @@ with import <stockholm/lib>;
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix> <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
]; ];
krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [
"brother-udev-rule-type1-" "brother-udev-rule-type1"
"brscan4-" "brscan4"
"mfcl2700dnlpr-" "brscan4-etc-files"
"mfcl2700dnlpr"
]; ];
hardware.sane = { hardware.sane = {

View File

@ -31,7 +31,8 @@ with import <stockholm/lib>;
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
nixpkgs.config.allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "unrar-" pkg.name); nixpkgs.config.allowUnfreePredicate = pkg: packageName pkg == "unrar";
krebs = { krebs = {
enable = true; enable = true;

View File

@ -5,10 +5,11 @@ with import <stockholm/lib>;
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix> <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
]; ];
krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [
"brother-udev-rule-type1-" "brother-udev-rule-type1"
"brscan4-" "brscan4"
"mfcl2700dnlpr-" "brscan4-etc-files"
"mfcl2700dnlpr"
]; ];
hardware.sane = { hardware.sane = {

View File

@ -39,5 +39,5 @@ with import <stockholm/lib>;
HandleSuspendKey=ignore HandleSuspendKey=ignore
''; '';
krebs.nixpkgs.allowUnfreePredicate = pkg: hasPrefix "broadcom-sta-" pkg.name; krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta";
} }

View File

@ -10,10 +10,11 @@ with import <stockholm/lib>;
#hardware.bumblebee.enable = true; #hardware.bumblebee.enable = true;
#hardware.bumblebee.group = "video"; #hardware.bumblebee.group = "video";
#hardware.enableRedistributableFirmware= true; #hardware.enableRedistributableFirmware= true;
#krebs.nixpkgs.allowUnfreePredicate = pkg: #krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [
# hasPrefix "nvidia-x11-" pkg.name || # "nvidia-x11"
# hasPrefix "nvidia-persistenced-" pkg.name || # "nvidia-persistenced"
# hasPrefix "nvidia-settings-" pkg.name; # "nvidia-settings"
#];
} }
]; ];

View File

@ -16,7 +16,7 @@ with import <stockholm/lib>;
}; };
krebs.nixpkgs.allowUnfreePredicate = pkg: krebs.nixpkgs.allowUnfreePredicate = pkg:
elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ]; packageName pkg == "imagescan-plugin-networkscan";
nixpkgs.overlays = singleton (self: super: { nixpkgs.overlays = singleton (self: super: {
utsushi-customized = self.utsushi.override { utsushi-customized = self.utsushi.override {