summaryrefslogtreecommitdiff
path: root/modules/overlays.nix
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-05-18 21:39:53 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-05-18 21:39:53 +0100
commita3a64453e0ec17451a454b70d506ceceabb2ccdf (patch)
tree96e74e6a8e795e60dab2e222dbf86263f994e53d /modules/overlays.nix
parentcefc28d1f5a54f1d46f91931f2424769b46a23a2 (diff)
add overlays module, for convenience in setting them up
Diffstat (limited to 'modules/overlays.nix')
-rw-r--r--modules/overlays.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/overlays.nix b/modules/overlays.nix
new file mode 100644
index 0000000..423275c
--- /dev/null
+++ b/modules/overlays.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }:
+with lib;
+
+let
+ cfg = config.eth.overlays;
+
+ mozilla = import (builtins.fetchTarball
+ "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz");
+
+ eth = import ../pkgs;
+
+in {
+ options.eth.overlays = {
+ eth = mkEnableOption "Eth (yours truly)";
+ mozilla = mkEnableOption "Mozilla (Rust, Firefox, etc)";
+ };
+
+ config.nixpkgs.overlays = builtins.concatLists [
+ ( if cfg.eth then [ eth ] else [] )
+ ( if cfg.mozilla then [ mozilla ] else [] )
+ ];
+}