initial commit
This commit is contained in:
commit
1f9e5e17af
19 changed files with 1515 additions and 0 deletions
3
modules/shell/default.nix
Normal file
3
modules/shell/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
imports = [ ./zsh/default.nix ];
|
||||
}
|
||||
43
modules/shell/zsh/aliases.nix
Normal file
43
modules/shell/zsh/aliases.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with pkgs; {
|
||||
ytmp3 = ''
|
||||
${getExe yt-dlp} -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s"'';
|
||||
cat = "${getExe bat} --style=plain";
|
||||
vpn = "mullvad";
|
||||
uuid = "cat /proc/sys/kernel/random/uuid";
|
||||
grep = getExe ripgrep;
|
||||
fzf = getExe skim;
|
||||
untar = "tar -xvf";
|
||||
untargz = "tar -xzf";
|
||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||
du = getExe du-dust;
|
||||
ps = getExe procs;
|
||||
m = "mkdir -p";
|
||||
fcd = "cd $(find -type d | fzf)";
|
||||
l = "ls -lF --time-style=long-iso --icons";
|
||||
sc = "sudo systemctl";
|
||||
scu = "systemctl --user ";
|
||||
la = "${getExe eza} -lah --tree";
|
||||
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
|
||||
tree = "${getExe eza} --tree --icons --tree";
|
||||
kys = "shutdown now";
|
||||
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
|
||||
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
|
||||
g = "git";
|
||||
n = "nix";
|
||||
mnt = "udisksctl mount -b";
|
||||
umnt = "udisksctl unmount -b";
|
||||
burn = "pkill -9";
|
||||
diff = "diff --color=auto";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../../";
|
||||
"...." = "cd ../../../";
|
||||
"....." = "cd ../../../../";
|
||||
"......" = "cd ../../../../../";
|
||||
}
|
||||
45
modules/shell/zsh/default.nix
Normal file
45
modules/shell/zsh/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.sessionVariables.STARSHIP_CACHE = "${config.xdg.cacheHome}/starship";
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
sessionVariables = {
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
ZSH_AUTOSUGGEST_USE_ASYNC = "true";
|
||||
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
|
||||
};
|
||||
history = {
|
||||
save = 2137;
|
||||
size = 2137;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
};
|
||||
|
||||
dirHashes = {
|
||||
music = "$HOME/Music";
|
||||
media = "/run/media/$USER";
|
||||
};
|
||||
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
64
modules/shell/zsh/tools.nix
Normal file
64
modules/shell/zsh/tools.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{pkgs, ...}: {
|
||||
services = {
|
||||
udiskie.enable = true;
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSshSupport = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
gpg.enable = true;
|
||||
man.enable = true;
|
||||
eza.enable = true;
|
||||
dircolors = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
skim = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
defaultCommand = "rg --files --hidden";
|
||||
changeDirWidgetOptions = [
|
||||
"--preview 'eza --icons --git --color always -T -L 3 {} | head -200'"
|
||||
"--exact"
|
||||
];
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
tealdeer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
display = {
|
||||
compact = false;
|
||||
use_pager = true;
|
||||
};
|
||||
updates = {
|
||||
auto_update = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
theme = "catppuccin-frappe";
|
||||
};
|
||||
themes = {
|
||||
catppuccin-mocha = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-frappe.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue