diff --git a/playbooks/input.yml b/playbooks/input.yml index 3d8aa48..273ed3f 100644 --- a/playbooks/input.yml +++ b/playbooks/input.yml @@ -15,6 +15,10 @@ prompt: "Do you want neovim nightly?" private: no default: "no" + - name: _hakatime_api_key + prompt: "What's your hakatime api key? (won't show up at the prompt)" + private: yes + default: "" tasks: - block: - name: Set dev machine fact @@ -26,3 +30,6 @@ - name: Set nightly neovim fact set_fact: _nightly_neovim: "{{ _nightly_neovim }}" + - name: Set Hakatime api key fact + set_fact: + _hakatime_api_key: "{{ _hakatime_api_key }}" diff --git a/playbooks/main.yml b/playbooks/main.yml index a4214b0..d3f9687 100644 --- a/playbooks/main.yml +++ b/playbooks/main.yml @@ -20,6 +20,7 @@ - dev_machine: "{{ _dev_machine }}" - rust_extras: "{{ _rust_extras }}" - nightly_neovim: "{{ _nightly_neovim }}" + - hakatime_api_key: "{{ _hakatime_api_key }}" - hosts: os_Fedora gather_facts: True @@ -32,6 +33,7 @@ - dev_machine: "{{ _dev_machine }}" - rust_extras: "{{ _rust_extras }}" - nightly_neovim: "{{ _nightly_neovim }}" + - hakatime_api_key: "{{ _hakatime_api_key }}" - hosts: os_Archlinux gather_facts: True @@ -44,6 +46,7 @@ - dev_machine: "{{ _dev_machine }}" - rust_extras: "{{ _rust_extras }}" - nightly_neovim: "{{ _nightly_neovim }}" + - hakatime_api_key: "{{ _hakatime_api_key }}" - hosts: os_Ubuntu gather_facts: False @@ -56,6 +59,7 @@ - dev_machine: "{{ _dev_machine }}" - rust_extras: "{{ _rust_extras }}" - nightly_neovim: "{{ _nightly_neovim }}" + - hakatime_api_key: "{{ _hakatime_api_key }}" - hosts: os_openSUSE* gather_facts: True @@ -68,4 +72,5 @@ - dev_machine: "{{ _dev_machine }}" - rust_extras: "{{ _rust_extras }}" - nightly_neovim: "{{ _nightly_neovim }}" + - hakatime_api_key: "{{ _hakatime_api_key }}" diff --git a/playbooks/roles/common/tasks/main.yml b/playbooks/roles/common/tasks/main.yml index 759878a..846523e 100644 --- a/playbooks/roles/common/tasks/main.yml +++ b/playbooks/roles/common/tasks/main.yml @@ -45,3 +45,10 @@ file: path: ~/bin state: directory + +- name: Lay down wakatime.cfg + when: + - hakatime_api_key != '' + template: + src: wakatime.cfg.j2 + dest: ~/.wakatime.cfg diff --git a/playbooks/roles/common/templates/wakatime.cfg.j2 b/playbooks/roles/common/templates/wakatime.cfg.j2 new file mode 100644 index 0000000..c701af1 --- /dev/null +++ b/playbooks/roles/common/templates/wakatime.cfg.j2 @@ -0,0 +1,3 @@ +[settings] +api_key={{ hakatime_api_key }} +api_url=https://hakatime.anthonycicchetti.com/api/v1/users/current/heartbeats.bulk diff --git a/zsh/zshrc b/zsh/zshrc index 836ca88..3f0852b 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -84,6 +84,7 @@ function nv() { path+=($HOME/.anyenv/bin) eval "$(anyenv init -)" +path+=($(yarn global bin)) export PATH #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!