diff --git a/README.md b/README.md index 6276c41..5420466 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ My current setup is [Regolith OS](https://regolith-desktop.com/) which is basica - thunderbird config - some kind of tag setup with: bootstrap, update, etc. - i3 app shortcuts -- Configuration for desktop at uni. It should be really similar, except syncthing should have a new keypair. Also some applications are not necessary, e.g. nicotine+ and virtualbox. Would like Ansible Vault to check in keypair for syncthing. However, then I would need a password to unlock the vault. @@ -29,7 +28,6 @@ As an intermediate solution, I can just put the password in keepass... - More cool plugins :) - dropdown autocomplete -- fzf in vim? telescope or something - https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#yamlls ## Long-term TODO diff --git a/roles/bash/files/fzf.bash b/roles/bash/files/fzf.bash index 0c7dffc..70ccce7 100644 --- a/roles/bash/files/fzf.bash +++ b/roles/bash/files/fzf.bash @@ -35,14 +35,14 @@ _fzf_comprun() { # Setup fzf # --------- -if [[ ! "$PATH" == */home/pim/repos/fzf/bin* ]]; then - PATH="${PATH:+${PATH}:}/home/pim/repos/fzf/bin" +if [[ ! "$PATH" == *~/repos/fzf/bin* ]]; then + PATH="${PATH:+${PATH}:}~/repos/fzf/bin" fi # Auto-completion # --------------- -[[ $- == *i* ]] && source "/home/pim/repos/fzf/shell/completion.bash" 2> /dev/null +[[ $- == *i* ]] && source "~/repos/fzf/shell/completion.bash" 2> /dev/null # Key bindings # ------------ -source "/home/pim/repos/fzf/shell/key-bindings.bash" +source "~/repos/fzf/shell/key-bindings.bash" diff --git a/roles/nicotine/templates/config.j2 b/roles/nicotine/templates/config.j2 index 1db8c5b..c603224 100644 --- a/roles/nicotine/templates/config.j2 +++ b/roles/nicotine/templates/config.j2 @@ -22,11 +22,11 @@ private_chatrooms = False command_aliases = {} [transfers] -incompletedir = /home/{{ ansible_user_id }}/.local/share/nicotine/incomplete -downloaddir = /home/{{ ansible_user_id }}/Music -uploaddir = /home/{{ ansible_user_id }}/.local/share/nicotine/received +incompletedir = {{ lookup('env','HOME') }}/.local/share/nicotine/incomplete +downloaddir = {{ lookup('env','HOME') }}/Music +uploaddir = {{ lookup('env','HOME') }}/.local/share/nicotine/received usernamesubfolders = False -shared = [('Music', '/home/{{ ansible_user_id }}/Music')] +shared = [('Music', '{{ lookup('env','HOME') }}/Music')] buddyshared = [] uploadbandwidth = 50 uselimit = False @@ -97,9 +97,9 @@ onematch = False [logging] debug = False debugmodes = [] -debuglogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/debug +debuglogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/debug logcollapsed = True -transferslogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/transfers +transferslogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/transfers rooms_timestamp = %H:%M:%S private_timestamp = %Y-%m-%d %H:%M:%S log_timestamp = %Y-%m-%d %H:%M:%S @@ -107,8 +107,8 @@ privatechat = True chatrooms = True transfers = False debug_file_output = False -roomlogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/rooms -privatelogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/private +roomlogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/rooms +privatelogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/private readroomlogs = True readroomlines = 15 readprivatelines = 15 diff --git a/roles/strawberry/templates/strawberry.conf.j2 b/roles/strawberry/templates/strawberry.conf.j2 index 0b146a9..127d755 100644 --- a/roles/strawberry/templates/strawberry.conf.j2 +++ b/roles/strawberry/templates/strawberry.conf.j2 @@ -86,7 +86,7 @@ group_by2=4 group_by3=0 group_by_version=1 io_priority=3 -last_path=/home/{{ ansible_user_id }}/Music +last_path={{ lookup('env','HOME') }}/Music mark_songs_unavailable=true monitor=true overwrite_playcount=false diff --git a/roles/syncthing/vars/main.yml b/roles/syncthing/vars/main.yml index 8f9cef3..66f3c09 100644 --- a/roles/syncthing/vars/main.yml +++ b/roles/syncthing/vars/main.yml @@ -18,25 +18,25 @@ syncthing: folders: - id: "6pgsm-opvsv" label: "Sync" - path: "/home/{{ ansible_user_id }}/sync" + path: "{{ lookup('env','HOME') }}/sync" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - id: "gfx9s-zaxrt" label: "Music" - path: "/home/{{ ansible_user_id }}/Music" + path: "{{ lookup('env','HOME') }}/Music" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - id: "tj35a-felne" label: "Keepass" - path: "/home/{{ ansible_user_id }}/keepass" + path: "{{ lookup('env','HOME') }}/keepass" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - id: "sjpmp-qavt4" label: "Uni" - path: "/home/{{ ansible_user_id }}/uni" + path: "{{ lookup('env','HOME') }}/uni" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" @@ -59,13 +59,13 @@ syncthing: folders: - id: "sjpmp-qavt4" label: "Uni" - path: "/home/{{ ansible_user_id }}/uni" + path: "{{ lookup('env','HOME') }}/uni" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" - id: "tj35a-felne" label: "Keepass" - path: "/home/{{ ansible_user_id }}/keepass" + path: "{{ lookup('env','HOME') }}/keepass" devices: - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 57479c5..0ab4b5d 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -15,6 +15,9 @@ - tree - wireshark - units +- name: test + debug: + msg: "{{ lookup('env','HOME') }}" - name: Install .gitconfig template: src: "{{ role_path }}/templates/.gitconfig.j2"