add syncthing for os3 desktop

This commit is contained in:
Pim Kunis 2023-02-11 19:27:38 +01:00
parent 3ac5371313
commit 98b79f5525
11 changed files with 184 additions and 134 deletions

View file

@ -1,5 +0,0 @@
all:
ansible-playbook playbooks/all.yml
%:
ansible-playbook playbooks/all.yml --tags "$@"

View file

@ -30,6 +30,7 @@ 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

@ -4,23 +4,25 @@
- role: system
tags: [system]
- role: bash
tags: [bash, os3]
tags: [bash]
- role: alacritty
tags: [alacritty, os3]
tags: [alacritty]
- role: wireguard
tags: [wireguard]
- role: asdf
tags: [asdf]
- role: neovim
tags: [neovim, os3]
tags: [neovim]
- role: signal
tags: [signal, os3]
tags: [signal]
- role: virtualbox
tags: [virtualbox]
- role: vscodium
tags: [vscodium, os3]
tags: [vscodium]
- role: syncthing
tags: [syncthing]
vars:
syncthing_profile: "laptop"
- role: strawberry
tags: [strawberry]
- role: nicotine

19
playbooks/os3.yml Normal file
View file

@ -0,0 +1,19 @@
- name: Setup system
hosts: self
roles:
- role: system
tags: [system]
- role: bash
tags: [bash]
- role: alacritty
tags: [alacritty]
- role: neovim
tags: [neovim]
- role: signal
tags: [signal]
- role: vscodium
tags: [vscodium]
- role: syncthing
tags: [syncthing]
vars:
syncthing_profile: "os3"

View file

@ -0,0 +1,45 @@
$ANSIBLE_VAULT;1.1;AES256
39323562326337633131623830353663626538646436616535383534363862623439353966373065
3333663932336566623865663130633030353761656639610a346163363232373563626265636231
35383439366632313962383035356461306461643066633932636130383232336533393961613131
6361333235626538620a366166303563623762386338303862323930373730306264363261376430
32376233363837653932366137636330343562376566383566666363616461383134643962353635
61613639326366346135623139326435643832323836376639313864396362353830616334383431
64333766643435626337653130396566653765633239663039366431393638316238316539353836
62333837393633623035343064656465376531353933376632363936316338366634366462323833
65646234663634313631623964613036383864346164343134613237333434383838353230636164
30373336323363623030303862613834626162303633376264326534663439363866316139363135
37646432306331333362306533333665643131346636353666613332393937383835323431356366
30386337646436366362333962663534656365316637653366663566646665383737656130393437
62316462366238353230323737353731616331616366303066643564363562393938636265366139
36343034353034306563373135333632323866326330313632666666353933653065336463336533
36313631633836646434636236306262323734346339373533396433633334333364613263393064
34633162373538623038343535306431306538303164313763326337313765303136353962323364
63623963366531633339306631343038666131656462616634666631343237353939633531663632
61376130613735336465366533313130356636636434636534373962336637616530666137666135
32616565373665316536313163386463646362336565396366373233376462303065353537613035
37323637333537396239613936363833326535633466383934656465366538646564373634396338
35353737633564336661616439313735626663326536666531383164303530353635326632343230
37313236326639326639306465643366633030663163383165323930313634623762633164383432
33653263376233386538323631343135383262616664356239663538346236333365616234393036
64643235343338633533303935383931356561343663313634663836656464663031346663363863
66633630373338383132343363653864323262386135343134376435343862363262613430616466
65623839356234383362383331373534356532633235366231343538323331623661356163616639
39306331623663623533386336356466333337376639313231646161373164313565323830616663
62633931666137666462646663613962386562323264313833303561313262323232666263663331
63616666356238633337356233653837376562656130356263303538346230306266313863393830
30336366643762613164353164323165643733393334313134323662323239633133303636616265
61336438333066323335656565326330663461626536653035393863613231363135643263666632
63613461653961313936613035313933353231346432373738363561353632396139383234396432
37323639663835323634323231306233656337353437373162366565396530363566383663306431
39373765373335643837633236363135363038613533306235643937356464393063326436623463
65323861636565623934393537366537376664346363643134396136643336376238633666373132
31316330376565653531386666343038373562636566343266383665373866373862333131656539
63373536323863666663353666653131346638396665616633353437326336343231303837383164
65626237636634383661353637636230633163373461626536393938613462346331313635333131
34646665653533643936363764623536623563336466386264616566306239313763303838313664
39636438353166393038383862623764376534646638653534326539343766623361643230323762
63333735633034326266393832643931633632396632383831376666326439616266383961353237
64376534323234343962326161633230656264303763623737613136633734366661333632316134
39366131353834653333636139393334646336616631623264653163343932666137393538316239
64303139333535363431

View file

@ -0,0 +1,20 @@
$ANSIBLE_VAULT;1.1;AES256
35346439383133353933356233626365393230353664376566303363323130376338333236353337
3336306236326233633635653933646266326466653163640a643062623932303861386536336361
39626435636636353866316430383761353437653861383030653335613131656165643238656364
3434313330613937390a386333633863326139383135363837643330653539376164626161336532
36396330626633323466653032383765613136663861386165663039643637613566626332343033
66356566373833633831343266336231353032646663366363386466323136303230383231656663
63323263643931373731613163326561386266383464386330363265383831323034343435336532
62363962656664376635623034653932396163333165346366353730356439393932383032323733
33613637373534613163393433336263646239343430313665663830313834356531316261656439
30666666303734366333346138613866666439353837623334306535333636626632313836303631
63613464336563623837326137623337343031613462376437643239666364316230653031653039
64666138353864383236633534666536303139636462376338646633623032636530343536323336
34643632623538353963313038366562303634643766613865343330373562336665613334343335
62313439396166326537383735323566646432393536366336633632663438386537353865646536
30396430616539343364663630316435363635353632623836353061353765316462643963393134
39393239646462383533613163313964323833306135303031363964383466383530393833386138
31363531326133353438323836323936323636666264626238396639663939353661323235613562
32356234353030303538653735336164643839323162613261396362376262346138346163613630
613435313033633738313134333966383933

View file

@ -11,14 +11,16 @@
src: "{{ role_path }}/templates/config.xml.j2"
dest: ~/.config/syncthing/config.xml
register: config
vars:
profile: "{{ syncthing[syncthing_profile] }}"
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
src: "{{ role_path }}/files/{{ syncthing_profile }}/key.pem"
dest: ~/.config/syncthing/key.pem
register: private_key
- name: Copy Syncthing certificate
copy:
src: "{{ role_path }}/files/cert.pem"
src: "{{ role_path }}/files/{{ syncthing_profile }}/cert.pem"
dest: ~/.config/syncthing/cert.pem
register: certificate
- name: Enable Syncthing

View file

@ -1,12 +1,12 @@
<configuration version="37">
<folder id="6pgsm-opvsv" label="Sync" path="/home/{{ ansible_user_id }}/sync" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
{% for folder in profile.folders %}
<folder id="{{ folder.id }}" label="{{ folder.label }}" path="{{ folder.path }}" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
{% for device in folder.devices %}
<device id="{{ device }}" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
{% endfor %}
<minDiskFree unit="%">1</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
@ -43,105 +43,9 @@
<maxTotalSize>4096</maxTotalSize>
</xattrFilter>
</folder>
<folder id="gfx9s-zaxrt" label="Music" path="/home/{{ ansible_user_id }}/Music" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<minDiskFree unit="%">1</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
<fsPath></fsPath>
<fsType>basic</fsType>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>2</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>false</junctionsAsDirs>
<syncOwnership>false</syncOwnership>
<sendOwnership>false</sendOwnership>
<syncXattrs>false</syncXattrs>
<sendXattrs>false</sendXattrs>
<xattrFilter>
<maxSingleEntrySize>1024</maxSingleEntrySize>
<maxTotalSize>4096</maxTotalSize>
</xattrFilter>
</folder>
<folder id="tj35a-felne" label="Keepass" path="/home/{{ ansible_user_id }}/keepass" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<minDiskFree unit="%">1</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
<fsPath></fsPath>
<fsType>basic</fsType>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>2</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>false</junctionsAsDirs>
<syncOwnership>false</syncOwnership>
<sendOwnership>false</sendOwnership>
<syncXattrs>false</syncXattrs>
<sendXattrs>false</sendXattrs>
<xattrFilter>
<maxSingleEntrySize>1024</maxSingleEntrySize>
<maxTotalSize>4096</maxTotalSize>
</xattrFilter>
</folder>
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" name="Server" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>dynamic</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
<untrusted>false</untrusted>
<remoteGUIPort>0</remoteGUIPort>
</device>
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" name="pim-x260" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
{% endfor %}
{% for device in profile.devices %}
<device id="{{ device.id }}" name="{{ device.name }}" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>dynamic</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
@ -151,9 +55,10 @@
<untrusted>false</untrusted>
<remoteGUIPort>0</remoteGUIPort>
</device>
{% endfor %}
<gui enabled="true" tls="false" debugging="false">
<address>127.0.0.1:40465</address>
<apikey>{{ syncthing.apikey }}</apikey>
<apikey>{{ profile.apikey }}</apikey>
<theme>default</theme>
</gui>
<ldap></ldap>
@ -178,7 +83,7 @@
<natTimeoutSeconds>10</natTimeoutSeconds>
<urAccepted>3</urAccepted>
<urSeen>3</urSeen>
<urUniqueID>{{ syncthing.usage_report_unique_id }}</urUniqueID>
<urUniqueID>{{ profile.usage_report_unique_id }}</urUniqueID>
<urURL>https://data.syncthing.net/newdata</urURL>
<urPostInsecurely>false</urPostInsecurely>
<urInitialDelayS>1800</urInitialDelayS>
@ -211,7 +116,7 @@
<defaults>
<folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
<device id="{{ profile.default_device_id }}" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<minDiskFree unit="%">1</minDiskFree>

View file

@ -1,16 +1,77 @@
syncthing:
apikey: !vault |
$ANSIBLE_VAULT;1.1;AES256
63616464333437376436333362353263396536633733656431363563626364346536376331646531
3762666230663933633937303130356238343963323030320a643639353833616666316536326434
65333136656530353062303434633830343765613937386134303463323730666332353439343762
3230356330333565630a336239646134333364383165383662393735306566666662623237663164
35633538303738366538666466626666633431363134633963313739623231363065653936383131
6637636561393762323431303430353661396162393463646636
usage_report_unique_id: !vault |
$ANSIBLE_VAULT;1.1;AES256
65636631303566326435306335663363393362613565326638666336353139376538343631663365
6666643239396464326438353438323033343334363731340a376638633564626563373866353132
30306363303664363233303533653232386264666432303537313630373636613061633237373930
6434346565383833300a316334663965353066633234636564653366326436663163363733616439
6666
laptop:
apikey: !vault |
$ANSIBLE_VAULT;1.1;AES256
63616464333437376436333362353263396536633733656431363563626364346536376331646531
3762666230663933633937303130356238343963323030320a643639353833616666316536326434
65333136656530353062303434633830343765613937386134303463323730666332353439343762
3230356330333565630a336239646134333364383165383662393735306566666662623237663164
35633538303738366538666466626666633431363134633963313739623231363065653936383131
6637636561393762323431303430353661396162393463646636
usage_report_unique_id: !vault |
$ANSIBLE_VAULT;1.1;AES256
65636631303566326435306335663363393362613565326638666336353139376538343631663365
6666643239396464326438353438323033343334363731340a376638633564626563373866353132
30306363303664363233303533653232386264666432303537313630373636613061633237373930
6434346565383833300a316334663965353066633234636564653366326436663163363733616439
6666
folders:
- id: "6pgsm-opvsv"
label: "Sync"
path: "/home/{{ ansible_user_id }}/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"
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"
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"
devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
devices:
- name: "Server"
id: "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- name: "Laptop"
id: "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
default_device_id: "QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS"
os3:
apikey: !vault |
$ANSIBLE_VAULT;1.1;AES256
32653230666137343364326666663236393131613734366464386461373364376636346265306639
6434353439633730343936323536653138353565376232650a616363313339383162343336663234
39623465306630623338393637383232353236383164376636313236663065326661616166366138
3230333933653262640a623734666464636237383732323864353135633936656336366264313064
35396666373238323262363133393861653533396633653833653233373831616462663061393361
3630363063373638613632303234363637653133356162666366
usage_report_unique_id: ""
folders:
- id: "sjpmp-qavt4"
label: "Uni"
path: "/home/{{ ansible_user_id }}/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"
devices:
- "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU"
devices:
- name: "Server"
id: "IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC"
- name: "OS3"
id: "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU"
default_device_id: "VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU"