summaryrefslogtreecommitdiff
path: root/modules/overlays.nix
blob: 423275cd067edfd3309cc32e3a1aed86861d34c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 [] )
  ];
}