56 lines
928 B
Nix
56 lines
928 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
with lib;
|
|
|
|
{
|
|
home.file = {
|
|
".config/starship.toml".source = ./starship.toml;
|
|
".config/fish/conf.d/last-working-dir.fish".source = ./last-working-dir.fish;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
starship
|
|
lazygit
|
|
];
|
|
|
|
home.shellAliases = {
|
|
g = "lazygit";
|
|
ls = "ls --color";
|
|
la = "ls -Alh --color";
|
|
grep = "grep --color";
|
|
conf = "edit-config";
|
|
};
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
};
|
|
|
|
programs.fish = {
|
|
enable = true;
|
|
|
|
interactiveShellInit = "set fish_greeting"; # Disable default greeting
|
|
|
|
functions = {
|
|
mkcd = ''
|
|
mkdir $argv
|
|
cd $argv
|
|
'';
|
|
run = ''
|
|
nix run nixpkgs#"$argv[1]" -- $argv[2..-1]
|
|
'';
|
|
shell = ''
|
|
set args
|
|
for arg in $argv
|
|
set args $args nixpkgs#$arg
|
|
end
|
|
nix shell $args
|
|
'';
|
|
};
|
|
};
|
|
}
|