Changes
6 changed files (+100/-6)
-
-
@@ -62,12 +62,6 @@ '';}; }; # JSON view/query tool # https://github.com/jqlang/jq jq = { enable = true; }; # Colourful `cat` # https://github.com/sharkdp/bat bat = {
-
-
-
@@ -0,0 +1,25 @@# Configurations for data-related tasks: inspect, modify, etc... { config, lib, pkgs, ... }: { options = { features.data.enable = lib.mkEnableOption "Data"; }; imports = [ ./nushell.nix ]; config = lib.mkIf config.features.data.enable { home.packages = with pkgs; [ # An advanced calculator library (`qalc` command) # https://qalculate.github.io/ libqalculate ]; programs = { # JSON view/query tool # https://github.com/jqlang/jq jq = { enable = true; }; }; }; }
-
-
-
@@ -0,0 +1,51 @@{ config, lib, pkgs, ... }: let cfg = config.features.data.nushell; colorGroup = lib.types.attrsOf (lib.types.either lib.types.nonEmptyStr colorGroup); serializeGroup = g: let lines = lib.attrsets.mapAttrsToList (name: colorOrSubGroup: "${name}: ${if (builtins.isString colorOrSubGroup) then "\"${colorOrSubGroup}\"" else (serializeGroup colorOrSubGroup)}" ) g; in "{ ${lib.strings.concatStringsSep " " lines} }"; in { options = { features.data.nushell.colorConfig = lib.mkOption { description = '' Nushell color config object. See https://www.nushell.sh/book/coloring_and_theming.html#theming for details. ''; type = colorGroup; default = { }; }; }; config = lib.mkIf config.features.data.enable { programs.nushell = { enable = lib.mkDefault true; configFile.text = '' $env.config = { show_banner: false color_config: ${serializeGroup cfg.colorConfig} edit_mode: vi ls: { use_ls_colors: true } } ''; envFile.text = '' ''; }; }; }
-
-
-
@@ -7,5 +7,6 @@ ./basics./gui ./wayland-de ./dev ./data ]; }
-
-
-
@@ -48,6 +48,7 @@ email = "pockawoooh@gmail.com";gpgSigningKeyId = "5E5148973E291363"; }; data.enable = true; scm.enable = true; home = {
-
-
-
@@ -50,6 +50,28 @@ vcs.unstaged = zshFg flavor.red.hex;symbol = zshFg flavor.overlay0.hex; }; # Only a subset of configurable knobs... Nushell's docs and API stability is unbelievably bad. features.data.nushell = lib.mkIf (config.features.data.enable && config.programs.nushell.enable) { colorConfig = { separator = flavor.subtext1.hex; leading_trailing_space_bg = flavor.mantle.hex; header = flavor.green.hex; row_index = flavor.pink.hex; hints = flavor.subtext0.hex; date = flavor.maroon.hex; string = flavor.text.hex; bool = flavor.peach.hex; int = flavor.peach.hex; float = flavor.peach.hex; shape_bool = flavor.peach.hex; shape_string = flavor.green.hex; shape_int = flavor.peach.hex; shape_float = flavor.peach.hex; }; }; home.packages = [ # A generator for LS_COLORS with support for multiple color themes # https://github.com/sharkdp/vivid
-