summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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 [] )
+ ];
+}