2024-02-06 08:10:00 +01:00
|
|
|
# flakelight -- Framework for simplifying flake setup
|
|
|
|
# Copyright (C) 2023 Archit Gupta <archit@accelbread.com>
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2024-02-07 09:54:03 +01:00
|
|
|
{ config, lib, flakelight, genSystems, ... }:
|
2024-02-06 08:10:00 +01:00
|
|
|
let
|
|
|
|
inherit (lib) mkIf mkOption;
|
2024-02-07 09:54:03 +01:00
|
|
|
inherit (lib.types) functionTo pkgs;
|
|
|
|
inherit (flakelight.types) nullable;
|
2024-02-06 08:10:00 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.legacyPackages = mkOption {
|
2024-02-07 09:54:03 +01:00
|
|
|
type = nullable (functionTo pkgs);
|
2024-02-06 08:10:00 +01:00
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
|
|
|
|
config.outputs = mkIf (config.legacyPackages != null) {
|
|
|
|
legacyPackages = genSystems config.legacyPackages;
|
|
|
|
};
|
|
|
|
}
|