feat: yubi
This commit is contained in:
parent
768c306165
commit
680ef5dc75
3 changed files with 68 additions and 55 deletions
|
|
@ -222,6 +222,7 @@
|
|||
wl-clipboard
|
||||
wofi
|
||||
wofi-pass
|
||||
yubioath-flutter
|
||||
zip
|
||||
zoxide
|
||||
];
|
||||
|
|
@ -316,6 +317,7 @@
|
|||
fprintd.enable = true;
|
||||
blueman.enable = true;
|
||||
onedrive.enable = true;
|
||||
udev.packages = [ pkgs.yubikey-personalization ];
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
|
|
|||
|
|
@ -41,10 +41,21 @@
|
|||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
(pkgs.writeShellScriptBin "mux-sessionizer" ''
|
||||
session=$(tmuxinator list | tail -n +2 | tr -s '[:space:]' '\n' | fzf)
|
||||
tmuxinator_sessions=$(tmuxinator list | tail -n +2 | tr -s '[:space:]' '\n' | sed '/^$/d')
|
||||
running_sessions=$(${pkgs.tmux}/bin/tmux list-sessions -F '#{session_name}' 2>/dev/null)
|
||||
|
||||
session=$(printf '%s\n%s' "$tmuxinator_sessions" "$running_sessions" | sort -u | sed '/^$/d' | fzf)
|
||||
|
||||
if [ -n "$session" ]; then
|
||||
if ${pkgs.tmux}/bin/tmux has-session -t "$session" 2>/dev/null; then
|
||||
if [ -n "$TMUX" ]; then
|
||||
${pkgs.tmux}/bin/tmux switch-client -t "$session"
|
||||
else
|
||||
${pkgs.tmux}/bin/tmux attach-session -t "$session"
|
||||
fi
|
||||
else
|
||||
tmuxinator start "$session"
|
||||
fi
|
||||
else
|
||||
echo "No session selected"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,4 +1,56 @@
|
|||
{...}: {
|
||||
programs.eza.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "exa --icons -l";
|
||||
l = "exa --icons -la";
|
||||
ls = "exa --icons";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
clear = "clear && fastfetch";
|
||||
sl = "sl | lolcat";
|
||||
cds = "cd \"$HOME/Nextcloud/Obsidian/FH/4. Semester/\"";
|
||||
mux = "tmuxinator";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
};
|
||||
initContent = ''
|
||||
bindkey -s ^f "mux-sessionizer\n"
|
||||
|
||||
fastfetch
|
||||
eval "$(zoxide init zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
append = true;
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"aliases"
|
||||
"bgnotify"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"command-not-found"
|
||||
"docker"
|
||||
"docker-compose"
|
||||
"gh"
|
||||
"git"
|
||||
"git-auto-fetch"
|
||||
"golang"
|
||||
"pass"
|
||||
"safe-paste"
|
||||
"tmuxinator"
|
||||
];
|
||||
theme = "custom";
|
||||
custom = "$HOME/.config/oh-my-zsh";
|
||||
};
|
||||
};
|
||||
home.file.".config/oh-my-zsh/themes/custom.zsh-theme".text = ''
|
||||
# OhMyZsh Strug Theme but with nix-shell support
|
||||
# Yoinked by d-hain
|
||||
|
|
@ -63,56 +115,4 @@
|
|||
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
|
||||
'';
|
||||
programs.eza.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "exa --icons -l";
|
||||
l = "exa --icons -la";
|
||||
ls = "exa --icons";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
clear = "clear && fastfetch";
|
||||
sl = "sl | lolcat";
|
||||
cds = "cd \"$HOME/Nextcloud/Obsidian/FH/2. Semester/\"";
|
||||
mux = "tmuxinator";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
};
|
||||
initContent = ''
|
||||
bindkey -s ^f "mux-sessionizer\n"
|
||||
|
||||
fastfetch
|
||||
eval "$(zoxide init zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
append = true;
|
||||
};
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"aliases"
|
||||
"bgnotify"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"command-not-found"
|
||||
"docker"
|
||||
"docker-compose"
|
||||
"gh"
|
||||
"git"
|
||||
"git-auto-fetch"
|
||||
"golang"
|
||||
"pass"
|
||||
"safe-paste"
|
||||
"tmuxinator"
|
||||
];
|
||||
theme = "custom";
|
||||
custom = "$HOME/.config/oh-my-zsh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue