From 45eebbb1ceff339d4fc21ae10f052210b994349d Mon Sep 17 00:00:00 2001 From: NullBite Date: Thu, 20 Feb 2025 01:32:22 -0500 Subject: [PATCH] flake(pkgs): move old package definitions to legacy-module.nix --- pkgs/legacy-module.nix | 51 ++++++++++++++++++++++++++++++++++++++++++ pkgs/module.nix | 51 +++++------------------------------------- 2 files changed, 56 insertions(+), 46 deletions(-) create mode 100644 pkgs/legacy-module.nix diff --git a/pkgs/legacy-module.nix b/pkgs/legacy-module.nix new file mode 100644 index 0000000..cff2ddf --- /dev/null +++ b/pkgs/legacy-module.nix @@ -0,0 +1,51 @@ +{ + inputs, + self, + config, + lib, + options, + ... +}: let + cfg = config.nixfiles.outputs.packages; + inherit (lib) mapAttrs mkEnableOption mkIf; +in { + options.nixfiles.outputs.packages = { + enable = + mkEnableOption "" + // { + description = '' + Whether to generate the packages output. + ''; + default = true; + }; + }; + config = mkIf cfg.enable { + perSystem = { + system, + inputs', + self', + pkgs, + ... + }: { + packages = let + inherit (pkgs) callPackage callPackages; + + # i forget how this works so i'm not messing with it. + mopidyPackages = callPackages ./mopidy { + python = pkgs.python3; + }; + in + (mapAttrs (_: v: callPackage v {}) { + google-fonts = ./google-fonts; + wm-helpers = ./wm-helpers; + atool = ./atool-wrapped; + nixfiles-assets = ./nixfiles-assets; + redlib = ./redlib; + cross-seed = ./cross-seed; + }) + // { + inherit (mopidyPackages) mopidy-autoplay; + }; + }; + }; +} diff --git a/pkgs/module.nix b/pkgs/module.nix index cff2ddf..e84bb71 100644 --- a/pkgs/module.nix +++ b/pkgs/module.nix @@ -1,51 +1,10 @@ +{ config, lib, ... }: { - inputs, - self, - config, - lib, - options, - ... -}: let - cfg = config.nixfiles.outputs.packages; - inherit (lib) mapAttrs mkEnableOption mkIf; -in { - options.nixfiles.outputs.packages = { - enable = - mkEnableOption "" - // { - description = '' - Whether to generate the packages output. - ''; - default = true; + imports = [ ./legacy-module.nix ]; + config = { + perSystem = { system, inputs', self', pkgs, ...}: { + packages = { }; - }; - config = mkIf cfg.enable { - perSystem = { - system, - inputs', - self', - pkgs, - ... - }: { - packages = let - inherit (pkgs) callPackage callPackages; - - # i forget how this works so i'm not messing with it. - mopidyPackages = callPackages ./mopidy { - python = pkgs.python3; - }; - in - (mapAttrs (_: v: callPackage v {}) { - google-fonts = ./google-fonts; - wm-helpers = ./wm-helpers; - atool = ./atool-wrapped; - nixfiles-assets = ./nixfiles-assets; - redlib = ./redlib; - cross-seed = ./cross-seed; - }) - // { - inherit (mopidyPackages) mopidy-autoplay; - }; }; }; }