1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2026-01-21 20:51:10 +00:00
ncc/modules/nushell/default.nix

55 lines
1.3 KiB
Nix

{ config, lib, pkgs, ... }: with lib; merge
(systemConfiguration {
users.defaultUserShell = pkgs.crash;
environment.sessionVariables.SHELLS = lib.getExe pkgs.nushellFull;
environment.shellAliases = {
la = "ls --all";
lla = "ls --long --all";
sl = "ls";
cp = "cp --recursive --verbose --progress";
mk = "mkdir";
mv = "mv --verbose";
rm = "rm --recursive --verbose";
pstree = "pstree -g 2";
tree = "tree -CF --dirsfirst";
};
})
(homeConfiguration {
programs.starship = enabled {
settings = {
command_timeout = 100;
scan_timeout = 20;
cmd_duration.show_notifications = isDesktop;
package.disabled = isServer;
character.error_symbol = "";
character.success_symbol = "";
};
};
programs.nushell = enabled {
package = pkgs.nushellFull;
configFile.text = readFile ./configuration.nu;
envFile.source = ./environment.nu;
environmentVariables = mapAttrs (const (value: ''"${value}"'')) config.environment.variables;
shellAliases = (attrsets.removeAttrs config.environment.shellAliases [ "ls" "l" ]) // {
cdtmp = "cd (mktemp --directory)";
ll = "ls --long";
};
};
})
(systemPackages (with pkgs; [
fish # For completions.
zoxide # For completions and better cd.
]))