about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake/packages/default.nix54
1 files changed, 42 insertions, 12 deletions
diff --git a/flake/packages/default.nix b/flake/packages/default.nix
index 1b14be6a..7a8aacc2 100644
--- a/flake/packages/default.nix
+++ b/flake/packages/default.nix
@@ -1,9 +1,8 @@
 {
   self,
   nixos-generators,
-  defaultSpecialArgs,
-  defaultModules,
   pkgs,
+  myPkgs,
   sysLib,
   nixVim,
   system,
@@ -13,15 +12,17 @@
   inherit (pkgs) lib;
   inherit (import ./merge.nix {inherit lib;}) merge;
   output = import ../../bootstrap {inherit pkgs sysLib;};
+
   args = {
     inherit pkgs;
     inherit (pkgs) lib;
   };
+
   nvim =
     builtins.mapAttrs (
       name: value: let
         nvim_config =
-          import ../../hm/soispha/conf/nvim/default.nix
+          import ../../modules/home/conf/nvim/default.nix
           args;
         build_args =
           args
@@ -54,18 +55,46 @@
         )
     )
     self.nixosConfigurations;
+
   output_neovim = lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair "nvim_${name}" value) nvim;
-  firefox = (import ../../hm/soispha/conf/firefox/scripts) {inherit pkgs sysLib;};
+
+  myPkgsFlat =
+    builtins.listToAttrs
+    # Filter out the `override` and `overrideDerivation` functions
+    (builtins.filter ({
+      name,
+      value,
+    }:
+      lib.attrsets.isDerivation value) (lib.lists.flatten
+      (
+        lib.attrsets.mapAttrsToList (name: value:
+          if lib.attrsets.isDerivation value
+          then [
+            {
+              inherit name value;
+            }
+          ]
+          else
+            lib.attrsets.mapAttrsToList (name: value: {
+              inherit name value;
+            })
+            value)
+        myPkgs
+      )));
+
+  firefox = (import ../../modules/home/conf/firefox/scripts) {inherit pkgs sysLib;};
 in
   {
-    install-iso = nixos-generators.nixosGenerate {
-      system = "x86_64-linux";
-      specialArgs = defaultSpecialArgs;
-      modules = [
-        ../../hosts/marduk
-      ];
-      format = "install-iso";
-    };
+    # install-iso = nixos-generators.nixosGenerate {
+    #   system = "x86_64-linux";
+    #   specialArgs = defaultSpecialArgs;
+    #   modules = [
+    #     ../../hosts/marduk
+    #   ];
+    #   format = "install-iso";
+    # };
+
+    inherit myPkgs;
 
     update_shell_lib = shell_library.packages."${system}".update_shell_library;
 
@@ -84,3 +113,4 @@ in
   // output
   // output_neovim
   // firefox
+  // myPkgsFlat