summary refs log tree commit diff
path: root/nixos/modules/config/system-path.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/config/system-path.nix')
-rw-r--r--nixos/modules/config/system-path.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index e14e4cf1314..da558a25d99 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -122,8 +122,16 @@ in
 
     system.path = pkgs.buildEnv {
       name = "system-path";
-      paths = config.environment.systemPackages;
+      paths = let
       inherit (config.environment) pathsToLink outputsToLink;
+        #outputs TODO: some code already merged by Eelco? make it user-customizable?
+        pkgOutputFun = pkg: lib.filter (p: p!=null) [
+          (pkg.bin or (pkg.out or pkg))
+          (pkg.man or null)
+          (pkg.info or null)
+          (pkg.doc or null)
+        ];
+        in lib.concatMap pkgOutputFun config.environment.systemPackages;
       ignoreCollisions = true;
       # !!! Hacky, should modularise.
       postBuild =