From 98360f4a616260e02dca6cea30736087ed578600 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Fri, 17 Jun 2022 12:25:21 +0200 Subject: [PATCH] Add chezmoi functions & poetry token --- dot_config/fish/private_config.fish.tmpl | 2 ++ dot_config/fish/private_functions/chezmoiapply.fish | 9 +++++++++ dot_config/fish/private_functions/chezmoiupdate.fish | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 dot_config/fish/private_functions/chezmoiapply.fish create mode 100644 dot_config/fish/private_functions/chezmoiupdate.fish diff --git a/dot_config/fish/private_config.fish.tmpl b/dot_config/fish/private_config.fish.tmpl index 081e2c4..dfbc378 100644 --- a/dot_config/fish/private_config.fish.tmpl +++ b/dot_config/fish/private_config.fish.tmpl @@ -20,6 +20,8 @@ set -gx GITLABBER_GIT_CONCURRENCY 10 set -gx PYPI_USERNAME __token__ set -gx PYPI_TOKEN {{ (bitwardenFields "item" "PyPi").token.value | quote }} set -gx POETRY_PYPI_TOKEN_PYPI $PYPI_TOKEN +set -gx POETRY_HTTP_BASIC_PYPI_USERNAME $PYPI_USERNAME +set -gx POETRY_HTTP_BASIC_PYPI_PASSWORD $PYPI_TOKEN set -gx GITEA_TOKEN {{ (bitwardenFields "item" "git.augendre.info").fish_config_token.value | quote }} diff --git a/dot_config/fish/private_functions/chezmoiapply.fish b/dot_config/fish/private_functions/chezmoiapply.fish new file mode 100644 index 0000000..779afac --- /dev/null +++ b/dot_config/fish/private_functions/chezmoiapply.fish @@ -0,0 +1,9 @@ +function chezmoiapply +if not bw login --check +set -x BW_SESSION (bw login --raw) +end +if not bw unlock --check +set -x BW_SESSION (bw unlock --raw) +end +chezmoi apply +end diff --git a/dot_config/fish/private_functions/chezmoiupdate.fish b/dot_config/fish/private_functions/chezmoiupdate.fish new file mode 100644 index 0000000..4060fc4 --- /dev/null +++ b/dot_config/fish/private_functions/chezmoiupdate.fish @@ -0,0 +1,9 @@ +function chezmoiupdate +if not bw login --check +set -x BW_SESSION (bw login --raw) +end +if not bw unlock --check +set -x BW_SESSION (bw unlock --raw) +end +chezmoi update +end