Update ssh key script; deps
Some checks failed
Lint / Lint (3.10) (push) Failing after 15s
Lint / Lint (3.11) (push) Failing after 18s

This commit is contained in:
Ariejan de Vroom 2024-06-07 13:44:37 +02:00
parent bf26066aaf
commit 05dc61cbd8
Signed by: ariejan
GPG Key ID: AD739154F713697B
6 changed files with 54 additions and 4 deletions

View File

@ -17,6 +17,7 @@ aur_helper: yay
packages:
- base-devel
- curl
- direnv
- docker
- docker-compose
- e2fsprogs
@ -24,6 +25,7 @@ packages:
- firefox
- flatpak
- git
- github-cli
- gnupg
- htop
- inetutils
@ -42,7 +44,10 @@ packages:
- rbw
- rsync
- screen
- stow
- sudo
- tea
- the_silver_searcher
- tilix
- tree
- unrar-free
@ -54,6 +59,7 @@ packages:
- zsh
aur_packages:
- antidote
- gohugo-extended-bin
- gnome-extensions-cli

View File

@ -0,0 +1,10 @@
{
"email": "ariejan@devroom.io",
"base_url": "https://bitwarden.devroom.io",
"identity_url": null,
"notifications_url": null,
"lock_timeout": 3600,
"sync_interval": 3600,
"pinentry": "pinentry",
"client_cert_path": null
}

View File

@ -25,3 +25,19 @@
mode: 0440
validate: /usr/sbin/visudo -cf %s
become: true
- name: Configure rbw
ansible.builtin.file:
path: ~/.config/rbw
state: directory
mode: '0755'
become: true
become_user: "{{ user.name }}"
- name: Copy rbw-config.json
ansible.builtin.copy:
src: rbw-config.json
dest: ~/.config/rbw/config.json
mode: '0644'
become: true
become_user: "{{ user.name }}"

View File

@ -3,3 +3,4 @@
ansible.builtin.shell: gext --filesystem install {{ item }}
with_items: "{{ gnome_extensions }}"
changed_when: true

View File

@ -6,11 +6,28 @@ if [ -f "${HOME}/.ssh/id_ed25519" ]; then
fi
HOSTNAME=`hostname`
GITHUB_TOKEN=`rbw get "Github CLI Token"`
GITEA_TOKEN=`rbw get "Gitea CLI Token"`
ssh-keygen -t ed25519 -C "$USER@$HOSTNAME"
ssh-keygen -t ed25519 -f "${HOME}/.ssh/id_ed25519" -q -P "" -C "$USER@$HOSTNAME"
gh ssh-key add "${HOME}/.ssh/id_ed25519.pub" --title "$USER@$HOSTNAME"
curl -X 'POST' \
'https://git.devroom.io/api/v1/user/keys' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: ${GITEA_TOKEN}' \
-d '{
"key": "",
"read_only": false,
"title": "$USER@$HOSTNAME"
}'
ssh-keyscan -H git.devroom.io >> "${HOME}/.ssh/known_hosts"
ssh-keyscan -H github.com >> "${HOME}/.ssh/known_hosts"
echo "--- Your public key, sir:"
echo "---"
cat "${HOME}/.ssh/id_ed25519.pub"
echo "---"