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
- 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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

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