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 --- module-list.nix | 1 + modules/overlays.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 modules/overlays.nix diff --git a/module-list.nix b/module-list.nix index 9981930..6f59f49 100644 --- a/module-list.nix +++ b/module-list.nix @@ -1,5 +1,6 @@ [ ./modules/keyboard.nix ./modules/linode.nix + ./modules/overlays.nix ./modules/yubikey.nix ] 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