41 lines
1,014 B
Nix
41 lines
1,014 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.programs.nushell;
|
|
in
|
|
{
|
|
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.nushell = {
|
|
enable = true;
|
|
package = pkgs.nushellFull;
|
|
configFile.source = ./config.nu;
|
|
envFile.source = ./env.nu;
|
|
|
|
extraEnv = ''
|
|
$env.command_not_found_db = ${config.programs.command-not-found.dbPath}
|
|
$env.NIX_SYSTEM = "${pkgs.system}"
|
|
'';
|
|
extraConfig = ''
|
|
alias vim = nvim
|
|
alias tree = ${pkgs.eza}/bin/eza -Fb --git --tree --icons
|
|
|
|
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim)
|
|
|
|
register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query
|
|
register ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats
|
|
|
|
use kink.nu
|
|
'';
|
|
};
|
|
|
|
xdg.configFile."nushell/scripts" = {
|
|
source = ./scripts;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
carapace
|
|
];
|
|
};
|
|
}
|