From 5321ad7bd7a3e659e3d1b8e3d27e1be48d8d51a2 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 19 Apr 2025 04:11:14 +0300 Subject: [PATCH] feat(config): fish formatting, secrets, op Signed-off-by: Ismo Vuorinen --- .editorconfig | 3 +++ config/fish/config.fish | 12 +++++++++++- config/op/plugins.sh | 2 ++ config/op/plugins/gh.json | 15 +++++++++++++++ config/op/plugins/used_items/gh.json | 1 + 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 config/op/plugins.sh create mode 100644 config/op/plugins/gh.json create mode 100644 config/op/plugins/used_items/gh.json diff --git a/.editorconfig b/.editorconfig index a9bdb7b..007025f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,9 @@ indent_style = space insert_final_newline = true trim_trailing_whitespace = true +[*.fish] +max_line_length = 80 + [*.md] max_line_length = 100 diff --git a/config/fish/config.fish b/config/fish/config.fish index 7529d26..b009858 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -8,13 +8,23 @@ test -e "$HOME/.config/fish/alias.fish" && test -e "$HOME/.config/fish/exports.fish" && source "$HOME/.config/fish/exports.fish" +test -e "$HOME/.config/fish/exports.secret.fish" && + source "$HOME/.config/fish/exports.secret.fish" + +test -e "$HOME/.dotfiles/config/fzf/key-bindings.fish" && + source "$HOME/.dotfiles/config/fzf/key-bindings.fish" + if status is-interactive # Commands to run in interactive shell + # 1Password plugins if op command is available + type -q op; and test -e "$HOME/.config/op/plugins.sh" && + source "$HOME/.config/op/plugins.sh" + # version manager initializers type -q rbenv; and source (rbenv init -|psub) type -q pyenv; and source (pyenv init -|psub) - type -q pyenv; and source (pyenv virtualenv-init -) + type -q pyenv; and source (pyenv virtualenv-init -|psub) type -q goenv; and source (goenv init -|psub) # type -q fnm; and fnm env --use-on-cd --shell fish | source type -q load_nvm; and load_nvm > /dev/stderr diff --git a/config/op/plugins.sh b/config/op/plugins.sh new file mode 100644 index 0000000..e78acdd --- /dev/null +++ b/config/op/plugins.sh @@ -0,0 +1,2 @@ +export OP_PLUGIN_ALIASES_SOURCED=1 +alias gh="op plugin run -- gh" diff --git a/config/op/plugins/gh.json b/config/op/plugins/gh.json new file mode 100644 index 0000000..2c8f646 --- /dev/null +++ b/config/op/plugins/gh.json @@ -0,0 +1,15 @@ +{ + "account_id": "S5Z2DMNFKJEZBPCWRHRWC4DCGI", + "entrypoint": [ + "gh" + ], + "credentials": [ + { + "plugin": "github", + "credential_type": "personal_access_token", + "usage_id": "personal_access_token", + "vault_id": "injcin7obv3jdet3r2u3kfihfy", + "item_id": "f6vinbnc6l7ngdzvlw66ayewlq" + } + ] +} \ No newline at end of file diff --git a/config/op/plugins/used_items/gh.json b/config/op/plugins/used_items/gh.json new file mode 100644 index 0000000..9eff365 --- /dev/null +++ b/config/op/plugins/used_items/gh.json @@ -0,0 +1 @@ +[{"account_id":"S5Z2DMNFKJEZBPCWRHRWC4DCGI","vault_id":"injcin7obv3jdet3r2u3kfihfy","item_id":"f6vinbnc6l7ngdzvlw66ayewlq"}] \ No newline at end of file