about summary refs log tree commit diff stats
path: root/flake/packages
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 18:28:30 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 18:28:30 +0200
commit5d2ab82409ad35709927c8e54ded1f530faa2e0a (patch)
tree57f62ecc14b0850d8049543023cb45423ab90480 /flake/packages
parentrefactor(flake): Update to new pkgs set (diff)
downloadnixos-config-5d2ab82409ad35709927c8e54ded1f530faa2e0a.tar.gz
nixos-config-5d2ab82409ad35709927c8e54ded1f530faa2e0a.zip
refactor(flake/packages): Export the new pkgs set
Diffstat (limited to 'flake/packages')
-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