diff --git a/modules/legacyPackages.nix b/modules/legacyPackages.nix
index eedc075..f07ab16 100644
--- a/modules/legacyPackages.nix
+++ b/modules/legacyPackages.nix
@@ -1,43 +1,21 @@
{ config, lib, flake-parts-lib, ... }:
let
inherit (lib)
- filterAttrs
- mapAttrs
mkOption
- optionalAttrs
types
;
inherit (flake-parts-lib)
- mkSubmoduleOptions
- mkPerSystemOption
+ mkTransposedPerSystemModule
;
in
-{
- options = {
- flake = mkSubmoduleOptions {
- legacyPackages = mkOption {
- type = types.lazyAttrsOf (types.lazyAttrsOf types.raw);
- default = { };
- description = ''
- Per system, an attribute set of unmergeable values. This is also used by nix build .#<attrpath>.
- '';
- };
- };
-
- perSystem = mkPerSystemOption ({ config, ... }: {
- options = {
- legacyPackages = mkOption {
- type = types.lazyAttrsOf types.raw;
- default = { };
- description = ''
- An attribute set of unmergeable values. This is also used by nix build .#<attrpath>.
- '';
- };
- };
- });
- };
-
- config = {
- transposition.legacyPackages = { };
+mkTransposedPerSystemModule {
+ name = "legacyPackages";
+ option = mkOption {
+ type = types.lazyAttrsOf types.raw;
+ default = { };
+ description = ''
+ An attribute set of unmergeable values. This is also used by nix build .#<attrpath>.
+ '';
};
+ file = ./legacyPackages.nix;
}