summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-05-18 21:39:53 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-05-18 21:39:53 +0100
commita3a64453e0ec17451a454b70d506ceceabb2ccdf (patch)
tree96e74e6a8e795e60dab2e222dbf86263f994e53d
parentcefc28d1f5a54f1d46f91931f2424769b46a23a2 (diff)
add overlays module, for convenience in setting them up
-rw-r--r--module-list.nix1
-rw-r--r--modules/overlays.nix22
2 files changed, 23 insertions, 0 deletions
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 [] )
+ ];
+}