From 18c8cf228d09b7055300e460f163979df23b4843 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Fri, 2 Dec 2022 18:20:12 +0000 Subject: [PATCH] gendry: resilio: add resilio sync folders --- .../default.nix | 1 + .../resilio.nix | 43 ++++++++++++++++++ .../default.nix | 1 + modules/resilio/default.nix | 2 + secrets/resilio/plain/dad.age | 36 ++++++++------- secrets/resilio/plain/joseph.age | Bin 953 -> 1097 bytes secrets/resilio/plain/projects.age | 35 +++++++------- secrets/resilio/plain/resources.age | Bin 939 -> 1032 bytes secrets/resilio/plain/sync.age | Bin 899 -> 1130 bytes secrets/secrets.nix | 10 ++-- 10 files changed, 91 insertions(+), 37 deletions(-) create mode 100644 hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/resilio.nix diff --git a/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix index e773f50..ed17338 100644 --- a/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix +++ b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix @@ -11,6 +11,7 @@ ../../modules/desktop/awesome/default.nix ./hardware-configuration.nix ./persist.nix + ./resilio.nix ]; config.boot.loader.systemd-boot.enable = true; diff --git a/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/resilio.nix b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/resilio.nix new file mode 100644 index 0000000..8d72787 --- /dev/null +++ b/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/resilio.nix @@ -0,0 +1,43 @@ +{ config, pkgs, lib, ... }: + +let + folderNames = [ + "dad" + "joseph" + "projects" + "resources" + "sync" + ]; +in +{ + imports = [ + ../../modules/resilio/default.nix + ]; + + ## Resilio Sync (Unencrypted) + config.services.resilio.enable = true; + config.services.resilio.deviceName = "gendry.jakehillion-terminals"; + config.services.resilio.directoryRoot = "/data/sync"; + + config.age.secrets = + let + mkSecret = name: { + name = "resilio/plain/${name}"; + value = { + file = ../../secrets/resilio/plain/${name}.age; + owner = "rslsync"; + group = "rslsync"; + }; + }; + in + builtins.listToAttrs (builtins.map (mkSecret) folderNames); + + config.resilioFolders = + let + mkFolder = name: { + name = name; + secretFile = config.age.secrets."resilio/plain/${name}".path; + }; + in + builtins.map (mkFolder) folderNames; +} diff --git a/hosts/vm.strangervm.ts.hillion.co.uk/default.nix b/hosts/vm.strangervm.ts.hillion.co.uk/default.nix index a68c2d7..104be0a 100644 --- a/hosts/vm.strangervm.ts.hillion.co.uk/default.nix +++ b/hosts/vm.strangervm.ts.hillion.co.uk/default.nix @@ -33,6 +33,7 @@ config.services.resilio.enable = true; config.services.resilio.deviceName = "vm.strangervm"; config.services.resilio.directoryRoot = "/data/sync"; + config.services.resilio.storagePath = "/data/sync/.sync"; config.age.secrets."resilio/encrypted/dad".file = ../../secrets/resilio/encrypted/dad.age; config.age.secrets."resilio/encrypted/projects".file = ../../secrets/resilio/encrypted/projects.age; diff --git a/modules/resilio/default.nix b/modules/resilio/default.nix index 4196506..372c6fa 100644 --- a/modules/resilio/default.nix +++ b/modules/resilio/default.nix @@ -9,6 +9,8 @@ default = [ ]; }; + config.users.users.jake.extraGroups = [ "rslsync" ]; + config.services.resilio.sharedFolders = let mkFolder = name: secretFile: { diff --git a/secrets/resilio/plain/dad.age b/secrets/resilio/plain/dad.age index 86acd21..decd438 100644 --- a/secrets/resilio/plain/dad.age +++ b/secrets/resilio/plain/dad.age @@ -1,19 +1,23 @@ age-encryption.org/v1 -> ssh-rsa GxPFJQ -ftrFecRNOiAyTpVmu/oa5AJ0jyFvzm8QN057U9FdKKWkmvBWRqJW92mbSWwFEUfq -r3Wc6DZIUdDGZQfHBaixEUUH3wrkaNLwrDlvhlqxI5BBK5zOcXU7bid9Jz8P5TWm -q3Tg5m1DmYUTyuylKK7BXWqJyVJz+p7ARcuk/gbR0l2sr+HeLw+SKPt/P8qM9Gx/ -IZJiaY2PybDD9A94/t9J/ygnkoDiFgqerMVihN/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hxPtQz481AfWyNxoYY5/LL +3+w6nxOKepQRLR3UWR9VtqbUcEGzL5vtFa95J9fo9VwNm23GRnOR0YcLRXL1XEC8 +PmmnbyRIFtF6QVWHOKrWoNCeMtt1HhvtdJtfdXjXgxb4WY0zlo3IIGzhb1LH5paS +I2G7WOzXYWpT6tE2XscyRUWvRv/zHAW2d9I0SoGr5kTaXteyxaKO8WQIb008wH0a +DDFfZFGy9gRZMd5HSyw21w +-> ssh-ed25519 rjda/A yWSI8iHqTUwXI5j/jPnpMI35Fu1h0d2vGfB4f3raUWI +pfYgQ6l4Wk9BmAdvg6cWEGSzWCSCHf5UsoeQK86KsT0 +-> p:]\-grease G<9`ko *Z)f (,1XyVQ opI +lpPrfopBJJczcj11KpcrNLY+WnBpEk1kMiDWN9w4VETpUu2AeEx4A/hXYrZmw46J +AsxqoH6KZtmF1RbSnw +--- I6cUdvVhTRjFXpJ601H6AKuSvrjApEr+Bsu9fpnaQr4 +cX r +2=dtı9)%ŐFo,CCLaJ1Mr \ No newline at end of file diff --git a/secrets/resilio/plain/joseph.age b/secrets/resilio/plain/joseph.age index 8ddffc419f00639658a3b13f239914f5e1f847f2..387a91f5dc8bfac2f67b434e039f82f6edcce4bc 100644 GIT binary patch literal 1097 zcmYk&JL~IY0LO7RAx;iXo}q|(&{ESU&81zGG->nX(k5w=rU{(kX|7Fkzcz(~2rhzW z7CeK4!ylZS1Q$1V2RFqRAov2Dj(-Qi7x3fz7I&!L)$@u>35Sfo4|hh%#gK~Kb7R8rDHZihXs?(4lL>JCmpv$`$D zv#c$2EcA~pY;A=bX>xJ7cLNe?YgY%dyxVbURb>TxA1^gqsk@Dnllyuz!U5zCZji)uY-MVZL>z;ekNgi>Kzju+%Aq9`5kSnL0k;6X1 z#*Ny8EzModrfgIfz3oqnio13FMw;tPUD5vISrzh*b~{Rkd9EbM+BJFLF2unw+zgBT z%GM*s1r0=|1T`q&imm@&TV7>07_ibyd1js^U=0fIiu59c?6ld|U9<0)shwVJ-&X8L z&aoB(wbg_0?%}Zzw-V2_6&f*Sd2Gg#&eU$c!R2xjuR#ol#wEI@bL^u{nilIA$UC4a zz3nwoah;^Gx^@^dfD@)WdW`WD_vL- zM&%MU*P2+v9`i$uV%<%0Cc_%iLr=3sMMwW>2R=bjU^S@|AK~nT!5fA`FgRVWx4jM^ zP(+Cm7$QJ|9?U5(x1@XryZidkU|emm>xFUh&(lMYxcFxD`$`DGdef59T!1;ub=pj< zi|74Yd*(jN-@v9hEap z1Y~})ac{Gt$00+`Jg9cgj-dFS5ZK=9?@So6%;rQMS_}>L_N<{hFKMODVzb$7QY-aw zFu-bIskJ>=711triG$|(M6FIFBdl5^kECtTiiLgo@@w^d^RG8PNuNKB9-b`zeA|5Z z=AGAGe|Yi-_<8fgcMmT=`~A&VpJU$am!E!|zxd+CtKUAI{yN^ix*op$`>p3sm*4*b DB;;@k literal 953 zcmYk*yUXij0Dy5pL5P#MI((xLYVzjtr5QYsd(yN?nzU&X1=AQQ*PauQE}*SSXdH=1aVb--wsj&HuEf_|9E?f1B0 zN#FzG$Gc=skAviDBYI(=&$Ct1ruLx#9$s$-g37Zpx&fED5Zz7|RL|(I71^AWgD8dU zh?s!m0)wbRMIEDd%1r(!EwQ+z>Of;@yx2tNTmuA}DI`u0alu7A(#p8ur@E4^w6X%Twf5t%R&0GNvcAvsfbn6WXML zDUiMW_=h$Vb+^5e;$ZNF$0^93*DkAvX}R*5Dm-lFc+In z9vK?FMW=%|IyGH>a}P55#3{?rGdMUB ztm-X~g_|5lIWvl67SF1yQZlZnyLoo#hG`~DCD`i82+&$_ca94tLJBce z20Ag7@qIAdAfiT82(blaU7GazHNAcq7mO?t!)Pcu@3Pxk81%K{iwZF5F(7L{mMb;n zTxo`71Vtp}F~gS2{`a4J@K*KFzpIBuA^-pY diff --git a/secrets/resilio/plain/projects.age b/secrets/resilio/plain/projects.age index e2d15e4..895c8ea 100644 --- a/secrets/resilio/plain/projects.age +++ b/secrets/resilio/plain/projects.age @@ -1,19 +1,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shhz795oV2BfmSJAIAqg --> %pb0-grease -D0lsv9hX1qZu+6d0N0ca3XvYyGcEEw ---- Q3QEKd6N8xqQ/pQ785t5GmISJE9n9w6GPq5Do/EPjog -NFu/!?kQy,A߮ [A6_,Ҹ(Ɖ9 \ No newline at end of file +sIx9uM5HSaRacP0PZkCAPre5wWhzqrnPqRg9FAUuamk3n22FQSHccxe/qSDz+62z +fC4P59b3i+nK9c3eRZgpcfckfCY4yAZCtmGyhSmoUjqqhzV+3aKb71w4ryeSpRaq +Wtl1Kldos1U2kD/A+PTnUNkxleiAQyj3CXHYoKbY3Ue6GKisxwsZi7wJxYhEtwC5 +WxvdfIf6zW1044kecG4JtR324RqTX71WrX0YzoLa9+KeEKpOLTtIAyfGfHaoJkrt +LwYP8rYQyVWqheebcspPdx4dfX5fApfqZcyEM0C3xTP6TdAqpBuDAQ2O0OD5nZAU +HEPsbCusO/sKIpG42LjsDg +-> ssh-ed25519 rjda/A FBL1ePiE9o9AoNa7KYVhPVG+HU71A+tdnNwCDie99wc +Uoc7czgFPasGdTckKbqSd7oL3FPvxHOFNmmaS7K+Szs +-> I5QT}y-grease +09Ga6xVZIJ+JDCc8yANARMO5OtDQlGuFuCkFvUIIP2aGWpYeQnXWiX9JGBZX2H8A +mq+EGdBJ828uB5URbQ +--- tpUtXw96P3jBUSjp7v0YYJHElLv/MmPM9BMHWotfs4s +'!!ətov#+QPljBBUUH9e_d o+Cp( \ No newline at end of file diff --git a/secrets/resilio/plain/resources.age b/secrets/resilio/plain/resources.age index 31ab254b1de9d5daf4e5580d55b2f845bc0c2de7..a1989df632639df1e1ab58a5d9007aa15a082ef5 100644 GIT binary patch literal 1032 zcmYk3JL~Io06;--3C_+1$57Ken+#XTyGfc?(>xjwZrUWjrfJ?y(qy(0xz zix%?Tl2jY=`=rQuY_NjO_7a790?wQHl*%435)Fqr-2ojeMB<%7jFZ)*awBSbrY@?Q=Q7z>W5KPd`UKAdV7l1F&7WE zS#t5pV~?`07~{yyO>(s54V3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-l=$j9|dvmOs;+L`b`@>gDDmUH}`!6J2_~~EaIXVvj diff --git a/secrets/resilio/plain/sync.age b/secrets/resilio/plain/sync.age index 5a775b7bb70b989a18760f476b074794958adcc4..43b1174eab5dbf39504e5162b04c9dfddce5c195 100644 GIT binary patch literal 1130 zcmYk4yAq>h0EM0H#6oARorzlP&SWA10!a#2ArK%yNVxq#N4WgqPJnPLb{zE)Y%P5O zUtnuXI}4j#?JO*|v2b>bg)_FNIdi`6craXqgvJ4@8iywM1V$C zgk016++AH9LQN}RukxGgL1yiT+D07BLU-FJjvP2)a?YKXo3b-&ZF#FQJ>YUeD9r}R zo$awW5<}XBZhbB1I?Kt9=JpMsGF~}ZE$jDA(cU;nIon~L@1{K@vAJ~?C{Y}Mja1su zQ#)rL*duTSQacL%YR?;if7eEl>!y$+b)E@%-rA>0y8hZTT6`x)=(hUAt(M8qN=d2S8jO@D0|&o%Owm9RNPxIk>&KPVl0&_=YWTSoTiFD z@(_<0unS?LWFlf-COm7~Qymtz_7LZ3LLbnlU?W%4$lml#Ic#?<=bQy$t*Ses?aQDN zuST-Eg`y!958pY_YBeXf>73EjA@Mfep5rSJ8a9^efxPq$TG81WolL_&qK@s%w<|c9 z(8e2ZP!XL4GRq7d!Dn0u7&KkOpc9g<*%)^U-jj(@Ae}QXT=x@4*qgO|Fn1HXzlVb> z;dO!xnM)kgRPr3o*K_H{DJMRL|IrQuoFuXBtWE+CrDxSz)KN#n=7x2~0L4O$8>}d5 zOy#=k?~_|!Hj=GRByZD5Mn-e|ka-quf(`8*9J_E)kg` zR|{B&UK7sjJ|&*%PmeRUtgG3{`usw$ANw=SR2cw}5%(i+&j*~T@R_KmcT>6!os+U0 zr{gJkq~n8O8)^a%X(WkNBa}3JESFig)hK5?A=$w>Ep55;SS7TZgS}<86ofux>D-Mk zM}x@KV5Eo#*T?4;i&+k?_i{~lN-%-0Pke4kYUX$oeS;vf2vpJ~>UA7H)P0FO{p8no zfBGZ)?u+BuON=k|_kMi!B6-q$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