Add support for configuring legacyPackages

This commit is contained in:
Archit Gupta
2024-02-05 23:10:00 -08:00
parent 086393b47b
commit 1fa95e0d84
3 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# flakelight -- Framework for simplifying flake setup
# Copyright (C) 2023 Archit Gupta <archit@accelbread.com>
# SPDX-License-Identifier: MIT
{ config, lib, genSystems, ... }:
let
inherit (lib) mkIf mkOption;
inherit (lib.types) functionTo nullOr pkgs;
in
{
options.legacyPackages = mkOption {
type = nullOr (functionTo pkgs);
default = null;
};
config.outputs = mkIf (config.legacyPackages != null) {
legacyPackages = genSystems config.legacyPackages;
};
}