legacy: pull in all overlays

This commit is contained in:
Timothy DeHerrera 2020-01-06 00:07:26 -07:00
parent 4cf8048807
commit 395be3f74c
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122

View file

@ -3,6 +3,8 @@
# flake support (e.g `nixos-option`), can work as expected. # flake support (e.g `nixos-option`), can work as expected.
{ lib, ... }: { lib, ... }:
let let
inherit (builtins) attrNames readDir;
hostname = lib.fileContents /etc/hostname; hostname = lib.fileContents /etc/hostname;
host = "/etc/nixos/hosts/${hostname}.nix"; host = "/etc/nixos/hosts/${hostname}.nix";
config = if (builtins.pathExists host) then config = if (builtins.pathExists host) then
@ -25,5 +27,8 @@ in {
"nixpkgs-overlays=/etc/nixos/overlays" "nixpkgs-overlays=/etc/nixos/overlays"
]; ];
nixpkgs.overlays = lib.singleton (import ./pkgs); nixpkgs.overlays = let
overlays = map (name: import (./overlays + "/${name}"))
(attrNames (readDir ./overlays));
in overlays;
} }