This commit is contained in:
Morten Olsen
2023-09-16 22:59:04 +02:00
parent 33f79566b7
commit a7bfa09045
14 changed files with 61 additions and 67 deletions

View File

@@ -2,20 +2,19 @@
{
imports = [
../fzf
../direnv
../gh
../tmux
../ssh
../git
../neovim
../bat
];
home.packages = [
pkgs.eza
pkgs.bat
pkgs.fzf
pkgs.fd
pkgs.curl
pkgs.jq
pkgs.rustup
pkgs.bitwarden-cli
pkgs.silver-searcher
pkgs.ripgrep
pkgs.thefuck
@@ -27,12 +26,14 @@
pkgs.nodePackages.yarn
pkgs.nodePackages.yo
pkgs.python3
pkgs.gh
pkgs.binutils
pkgs.pkg-config
];
programs.jq.enable = true;
programs.zsh.enable = true;
programs.yt-dlp.enable = true;
home.file = {
".env".source = ./files/env;
".zshrc".source = ./files/zshrc;

View File

@@ -1,6 +0,0 @@
if hash bat &> /dev/null; then
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export BAT_THEME="MonokaiExtended"
alias cat="bat"
fi

View File

@@ -1,8 +0,0 @@
export TMPDIR=${TMPDIR:-/tmp}
if ! pgrep -U "$UID" ssh-agent > /dev/null; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
fi

View File

@@ -1,26 +0,0 @@
function _bw_replace_env() {
env | while IFS= read -r line; do
value=${line#*=}
name=${line%%=*}
if [[ $value = bw://* ]]; then;
item=${value:5}
secret=`bw get password $item`
export $name="$secret"
fi
done
}
function clam-open() {
command=$1
if [[ -z "$BW_SESSION" ]]; then;
export BW_SESSION=`bw unlock --raw`
fi
_bw_replace_env
if [[ ! -z "$command" ]]; then;
eval $command
fi
}
function clam-close() {
unset BW_SESSION
}