From c3968ea04fe71b9e45432980c8c8326c7572eac6 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 17 May 2016 01:40:10 +0200 Subject: modules: Add a new module for license selection This basically provides module arguments with different variations of the pkgs arguments so that it's easier to allow specific unfree packages selectively. Note that I deliberately chose "unfreeAndNonDistributablePkgs", because we really want to let those packages stand out. We want to avoid building those packages on Hydra as much as possible. Signed-off-by: aszlig --- modules/profiles/licensing.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 modules/profiles/licensing.nix (limited to 'modules/profiles') diff --git a/modules/profiles/licensing.nix b/modules/profiles/licensing.nix new file mode 100644 index 00000000..1a7c9390 --- /dev/null +++ b/modules/profiles/licensing.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: + +let + overrideConfig = newConfig: import (import ../../nixpkgs-path.nix) { + inherit (config.nixpkgs) system; + config = config.nixpkgs.config // newConfig; + }; + +in { + _module.args = { + unfreePkgs = overrideConfig { + whitelistedLicenses = [ lib.licenses.unfreeRedistributable ]; + }; + + unfreeAndNonDistributablePkgs = overrideConfig { + allowUnfree = true; + }; + }; +} -- cgit 1.4.1