diff options
author | Ethel Morgan <eth@ethulhu.co.uk> | 2020-05-18 21:39:53 +0100 |
---|---|---|
committer | Ethel Morgan <eth@ethulhu.co.uk> | 2020-05-18 21:39:53 +0100 |
commit | a3a64453e0ec17451a454b70d506ceceabb2ccdf (patch) | |
tree | 96e74e6a8e795e60dab2e222dbf86263f994e53d /modules/overlays.nix | |
parent | cefc28d1f5a54f1d46f91931f2424769b46a23a2 (diff) |
add overlays module, for convenience in setting them up
Diffstat (limited to 'modules/overlays.nix')
-rw-r--r-- | modules/overlays.nix | 22 |
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 [] ) + ]; +} |