don't hardcode home directory path

This commit is contained in:
Pim Kunis 2023-02-13 10:57:18 +01:00
parent 486c785523
commit 09f3fb389a
6 changed files with 22 additions and 21 deletions

View file

@ -14,7 +14,6 @@ My current setup is [Regolith OS](https://regolith-desktop.com/) which is basica
- thunderbird config - thunderbird config
- some kind of tag setup with: bootstrap, update, etc. - some kind of tag setup with: bootstrap, update, etc.
- i3 app shortcuts - 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. Would like Ansible Vault to check in keypair for syncthing.
However, then I would need a password to unlock the vault. 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 :) - More cool plugins :)
- dropdown autocomplete - dropdown autocomplete
- fzf in vim? telescope or something
- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#yamlls - https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#yamlls
## Long-term TODO ## Long-term TODO

View file

@ -35,14 +35,14 @@ _fzf_comprun() {
# Setup fzf # Setup fzf
# --------- # ---------
if [[ ! "$PATH" == */home/pim/repos/fzf/bin* ]]; then if [[ ! "$PATH" == *~/repos/fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/home/pim/repos/fzf/bin" PATH="${PATH:+${PATH}:}~/repos/fzf/bin"
fi fi
# Auto-completion # 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 # Key bindings
# ------------ # ------------
source "/home/pim/repos/fzf/shell/key-bindings.bash" source "~/repos/fzf/shell/key-bindings.bash"

View file

@ -22,11 +22,11 @@ private_chatrooms = False
command_aliases = {} command_aliases = {}
[transfers] [transfers]
incompletedir = /home/{{ ansible_user_id }}/.local/share/nicotine/incomplete incompletedir = {{ lookup('env','HOME') }}/.local/share/nicotine/incomplete
downloaddir = /home/{{ ansible_user_id }}/Music downloaddir = {{ lookup('env','HOME') }}/Music
uploaddir = /home/{{ ansible_user_id }}/.local/share/nicotine/received uploaddir = {{ lookup('env','HOME') }}/.local/share/nicotine/received
usernamesubfolders = False usernamesubfolders = False
shared = [('Music', '/home/{{ ansible_user_id }}/Music')] shared = [('Music', '{{ lookup('env','HOME') }}/Music')]
buddyshared = [] buddyshared = []
uploadbandwidth = 50 uploadbandwidth = 50
uselimit = False uselimit = False
@ -97,9 +97,9 @@ onematch = False
[logging] [logging]
debug = False debug = False
debugmodes = [] debugmodes = []
debuglogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/debug debuglogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/debug
logcollapsed = True 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 rooms_timestamp = %H:%M:%S
private_timestamp = %Y-%m-%d %H:%M:%S private_timestamp = %Y-%m-%d %H:%M:%S
log_timestamp = %Y-%m-%d %H:%M:%S log_timestamp = %Y-%m-%d %H:%M:%S
@ -107,8 +107,8 @@ privatechat = True
chatrooms = True chatrooms = True
transfers = False transfers = False
debug_file_output = False debug_file_output = False
roomlogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/rooms roomlogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/rooms
privatelogsdir = /home/{{ ansible_user_id }}/.local/share/nicotine/logs/private privatelogsdir = {{ lookup('env','HOME') }}/.local/share/nicotine/logs/private
readroomlogs = True readroomlogs = True
readroomlines = 15 readroomlines = 15
readprivatelines = 15 readprivatelines = 15

View file

@ -86,7 +86,7 @@ group_by2=4
group_by3=0 group_by3=0
group_by_version=1 group_by_version=1
io_priority=3 io_priority=3
last_path=/home/{{ ansible_user_id }}/Music last_path={{ lookup('env','HOME') }}/Music
mark_songs_unavailable=true mark_songs_unavailable=true
monitor=true monitor=true
overwrite_playcount=false overwrite_playcount=false

View file

@ -18,25 +18,25 @@ syncthing:
folders: folders:
- id: "6pgsm-opvsv" - id: "6pgsm-opvsv"
label: "Sync" label: "Sync"
path: "/home/{{ ansible_user_id }}/sync" path: "{{ lookup('env','HOME') }}/sync"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
- id: "gfx9s-zaxrt" - id: "gfx9s-zaxrt"
label: "Music" label: "Music"
path: "/home/{{ ansible_user_id }}/Music" path: "{{ lookup('env','HOME') }}/Music"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
- id: "tj35a-felne" - id: "tj35a-felne"
label: "Keepass" label: "Keepass"
path: "/home/{{ ansible_user_id }}/keepass" path: "{{ lookup('env','HOME') }}/keepass"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
- id: "sjpmp-qavt4" - id: "sjpmp-qavt4"
label: "Uni" label: "Uni"
path: "/home/{{ ansible_user_id }}/uni" path: "{{ lookup('env','HOME') }}/uni"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" - "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
@ -59,13 +59,13 @@ syncthing:
folders: folders:
- id: "sjpmp-qavt4" - id: "sjpmp-qavt4"
label: "Uni" label: "Uni"
path: "/home/{{ ansible_user_id }}/uni" path: "{{ lookup('env','HOME') }}/uni"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" - "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU"
- id: "tj35a-felne" - id: "tj35a-felne"
label: "Keepass" label: "Keepass"
path: "/home/{{ ansible_user_id }}/keepass" path: "{{ lookup('env','HOME') }}/keepass"
devices: devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" - "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" - "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU"

View file

@ -15,6 +15,9 @@
- tree - tree
- wireshark - wireshark
- units - units
- name: test
debug:
msg: "{{ lookup('env','HOME') }}"
- name: Install .gitconfig - name: Install .gitconfig
template: template:
src: "{{ role_path }}/templates/.gitconfig.j2" src: "{{ role_path }}/templates/.gitconfig.j2"