From 1712001d2c6c8b5aeb83972663fd05b4763d38ab Mon Sep 17 00:00:00 2001 From: ene Date: Thu, 2 Feb 2023 19:14:05 +0100 Subject: Fix(packages): Add a function to disassemble the set --- system/packages/packages.nix | 60 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'system/packages') diff --git a/system/packages/packages.nix b/system/packages/packages.nix index e427ac94..a0b47bf1 100644 --- a/system/packages/packages.nix +++ b/system/packages/packages.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: +{pkgs, ...}: with pkgs; let Gui = { Terminals = [ @@ -69,7 +65,7 @@ with pkgs; let ]; WM = { - inherit river; # A dynamic tiling wayland compositor + river = [river]; # A dynamic tiling wayland compositor CLITools = [ lswt # List Wayland toplevels @@ -100,7 +96,7 @@ with pkgs; let }; LF = { - inherit lf; # A terminal file manager inspired by ranger + lf = [lf]; # A terminal file manager inspired by ranger Functions = [ broot # Fuzzy Search + tree + cd @@ -167,8 +163,8 @@ with pkgs; let }; Zsh = [ - zsh # A very advanced and programmable command interpreter (shell) for UNIX - zsh-syntax-highlighting # Fish shell like syntax highlighting for Zsh + #zsh # A very advanced and programmable command interpreter (shell) for UNIX + #zsh-syntax-highlighting # Fish shell like syntax highlighting for Zsh # next one only works if your alias is only a command, e.g. if you `alias='cat some_file.txt &2> /dev/null'`, running `cat some_file.txt` won't trigger it. # TODO find something better for this use case @@ -261,27 +257,32 @@ with pkgs; let #xorg-bdftopcf # Convert X font from Bitmap Distribution Format to Portable Compiled Format mapFun = x: - if isAttrs x - then attrValues x - else x; + if builtins.isAttrs x + then + if lib.isDerivation x + then [x] + else builtins.attrValues x + else [x]; in { - environment.systemPackages = with builtins; [ - map - mapFun - (map - mapFun - (map - mapFun - (attrValues Gui))) - - map - mapFun - (map - mapFun - (map - mapFun - (attrValues TuiCli))) - ]; + environment.systemPackages = with builtins; + concatLists + (concatLists [ + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (attrValues Gui))))))) + + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (concatMap mapFun + (attrValues TuiCli))))))) + ]); } # QEMU # TEX @@ -359,4 +360,3 @@ in { #xorg-xwininfo # Command-line utility to print information about windows on an X server #xorg-xwud # X Window System image undumping utility # }}} - -- cgit 1.4.1