about summary refs log tree commit diff
path: root/modules/profiles
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-05-17 01:40:10 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-05-17 01:46:01 +0200
commitc3968ea04fe71b9e45432980c8c8326c7572eac6 (patch)
tree796d9ca447e140736cca0e397d0b9b97fa72a653 /modules/profiles
parentf50de454fd2f4c919195b1cc904b89343c243451 (diff)
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/profiles')
-rw-r--r--modules/profiles/licensing.nix19
1 files changed, 19 insertions, 0 deletions
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;
+    };
+  };
+}