From a3a64453e0ec17451a454b70d506ceceabb2ccdf Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Mon, 18 May 2020 21:39:53 +0100 Subject: add overlays module, for convenience in setting them up --- modules/overlays.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/overlays.nix (limited to 'modules') 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 [] ) + ]; +} -- cgit v1.2.3