feat: yubi

This commit is contained in:
s-prechtl 2026-03-02 11:07:51 +01:00
parent 768c306165
commit 680ef5dc75
3 changed files with 68 additions and 55 deletions

View file

@ -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:

View file

@ -41,12 +41,23 @@
# # 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
tmuxinator start "$session"
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"
echo "No session selected"
fi
'')
];

View file

@ -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";
};
};
}