From 49d1e7ab7768a42940850cf5245cfcccbd77e3f8 Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Sat, 13 Mar 2021 05:12:54 +0100
Subject: [PATCH] top-level: Allow passing extra overlays

---
 configuration.nix   | 4 ++--
 machine-manager.nix | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configuration.nix b/configuration.nix
index ef13f94..082d7a4 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,5 +1,5 @@
 # This is the entry point for my NixOS configuration.
-{ name, path, channel, isIso, extraLayersDir, flakeInputs, flakeOutputs, system }:
+{ name, path, channel, isIso, extraLayersDir, flakeInputs, flakeOutputs, system, extraOverlays }:
 { lib, config, pkgs, ... }:
 
 let
@@ -60,7 +60,7 @@ in
     (import ./pkgs)
     flakeInputs.qd.overlay
     flakeInputs.q.overlay
-  ];
+  ] ++ extraOverlays;
 
   # Pin channel in nix path
   nix.nixPath = [ "nixpkgs=${channel}" ];
diff --git a/machine-manager.nix b/machine-manager.nix
index 0f07840..f8e4c23 100644
--- a/machine-manager.nix
+++ b/machine-manager.nix
@@ -1,7 +1,7 @@
 # entry point for machine configurations:
 # (import <repo-path> { machinesDir=./machines }).<netname>.configurations.<hostname>
 
-{ flakeInputs, flakeOutputs, machinesDir, extraLayersDir }:
+{ flakeInputs, flakeOutputs, machinesDir, extraLayersDir, extraOverlays ? [] }:
 
 with builtins;
 let
@@ -40,7 +40,7 @@ let
       mkMachineConfig = { name, path, isIso }: {
         imports = [
           (import ./configuration.nix {
-            inherit name path isIso extraLayersDir flakeInputs flakeOutputs system;
+            inherit name path isIso extraLayersDir flakeInputs flakeOutputs system extraOverlays;
             channel = machineChannels.${name};
           })
         ];
-- 
GitLab