nixos-config/home-manager/modules/nushell/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.programs.nushell;
nushell_plugin_formats = pkgs.callPackage ./plugin-formats.nix {
inherit (pkgs) stdenv lib rustPlatform;
inherit (pkgs.darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation;
nushell = config.programs.nushell.package;
};
in
{
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
config = mkIf cfg.enable {
programs.nushell = {
enable = true;
package = pkgs.nushell.override { additionalFeatures = p: p ++ [ "dataframe" ]; };
configFile.source = ./config.nu;
envFile.source = ./env.nu;
2023-04-19 10:58:03 +02:00
extraEnv = ''
let-env command_not_found_db = ${config.programs.command-not-found.dbPath}
let-env NIX_SYSTEM = "${pkgs.system}"
'';
2023-04-24 08:26:09 +02:00
extraConfig = ''
alias vim = nvim
alias tree = ${pkgs.exa}/bin/exa -Fb --git --tree
2023-04-25 09:48:32 +02:00
let-env LS_COLORS = (${pkgs.vivid}/bin/vivid generate dracula | str trim)
2023-04-24 08:26:09 +02:00
'';
};
2023-04-03 14:34:21 +02:00
home.packages = with pkgs; [
carapace
nushellPlugins.query
nushell_plugin_formats
];
};
}