mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 11:46:12 +01:00
error resolution
This commit is contained in:
40
home-manager/features/cli/aliases.nix
Normal file
40
home-manager/features/cli/aliases.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
myAliases = {
|
||||
".." = "cd ..";
|
||||
"cd.." = "cd ..";
|
||||
|
||||
ls = "command eza";
|
||||
grep = "grep --color=auto";
|
||||
fgrep = "fgrep --color=auto";
|
||||
egrep = "egrep --color=auto";
|
||||
|
||||
l="eza -G --icons";
|
||||
ll="eza -l --icons";
|
||||
lg="eza -lG";
|
||||
lall="eza -lahF --icons --git";
|
||||
lalg="eza -laGhF --icons --git";
|
||||
latree="eza -laGghHT --git --icons";
|
||||
la = "eza -la --git --icons";
|
||||
lsd = "eza -laD";
|
||||
|
||||
cls="clear";
|
||||
# df="df -ahiT --total";
|
||||
userlist="cut -d: -f1 /etc/passwd";
|
||||
free="free -mt";
|
||||
du="du -ach | sort -h";
|
||||
ps="ps auxf";
|
||||
|
||||
sudo="sudo ";
|
||||
reload="exec $SHELL -l";
|
||||
|
||||
xclip = "xclip -selection c";
|
||||
|
||||
mkdir="mkdir -pv";
|
||||
psmem="ps -e -orss=,args= | sort -b -k1 -nr";
|
||||
psmem10="ps -e -orss=,args= | sort -b -k1 -nr | head -10";
|
||||
pscpu="ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr";
|
||||
pscpu10="ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10";
|
||||
|
||||
gua = "git remote | xargs -L1 git push --all";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
programs.bash = {
|
||||
let cli = import ./aliases.nix; in
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = myAliases;
|
||||
};
|
||||
shellAliases = cli.myAliases;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
imports = [
|
||||
./bash.nix
|
||||
./git.nix
|
||||
./zsh.nix
|
||||
./zsh
|
||||
];
|
||||
# home.packages = with pkgs; [];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
programs.git = {
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Michał Czyż";
|
||||
userEmail = "mike@c2yz.com";
|
||||
@@ -23,4 +24,5 @@ programs.git = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
history.size = 10000000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
shellAliases = myAliases;
|
||||
|
||||
initExtra = ''
|
||||
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
# { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; }
|
||||
];
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
};
|
||||
|
||||
};
|
||||
39
home-manager/features/cli/zsh/default.nix
Normal file
39
home-manager/features/cli/zsh/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{config, pkgs, ...}: let
|
||||
cli = import ../aliases.nix;
|
||||
in {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
history.size = 10000000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
shellAliases = cli.myAliases;
|
||||
|
||||
initExtra = ''
|
||||
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
# { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; }
|
||||
];
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
programs.kitty = {
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
@@ -6,4 +7,5 @@ programs.kitty = {
|
||||
};
|
||||
|
||||
theme = "Gruvbox Dark";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
programs.neovim = {
|
||||
{pkgs, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.neovim-unwrapped;
|
||||
|
||||
@@ -7,4 +8,5 @@ programs.neovim = {
|
||||
vimdiffAlias = true;
|
||||
|
||||
defaultEditor = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,46 +7,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
myAliases = {
|
||||
".." = "cd ..";
|
||||
"cd.." = "cd ..";
|
||||
|
||||
ls = "command eza";
|
||||
grep = "grep --color=auto";
|
||||
fgrep = "fgrep --color=auto";
|
||||
egrep = "egrep --color=auto";
|
||||
|
||||
l="eza -G --icons";
|
||||
ll="eza -l --icons";
|
||||
lg="eza -lG";
|
||||
lall="eza -lahF --icons --git";
|
||||
lalg="eza -laGhF --icons --git";
|
||||
latree="eza -laGghHT --git --icons";
|
||||
la = "eza -la --git --icons";
|
||||
lsd = "eza -laD";
|
||||
|
||||
cls="clear";
|
||||
# df="df -ahiT --total";
|
||||
userlist="cut -d: -f1 /etc/passwd";
|
||||
free="free -mt";
|
||||
du="du -ach | sort -h";
|
||||
ps="ps auxf";
|
||||
|
||||
sudo="sudo ";
|
||||
reload="exec $SHELL -l";
|
||||
|
||||
xclip = "xclip -selection c";
|
||||
|
||||
mkdir="mkdir -pv";
|
||||
psmem="ps -e -orss=,args= | sort -b -k1 -nr";
|
||||
psmem10="ps -e -orss=,args= | sort -b -k1 -nr | head -10";
|
||||
pscpu="ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr";
|
||||
pscpu10="ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10";
|
||||
|
||||
gua = "git remote | xargs -L1 git push --all";
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
@@ -156,7 +117,7 @@ in {
|
||||
discord
|
||||
telegram-desktop
|
||||
libreoffice-fresh
|
||||
vscodium
|
||||
# vscodium
|
||||
vscode
|
||||
neovide
|
||||
lunarvim
|
||||
|
||||
Reference in New Issue
Block a user