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/Q2LTW6mod5SANlWvgCzak7pkJ -rji+/6zwd1mCg4Z7Sdq1Dgrid0WmDgF/ITSJdyF7hVkA5fGPUsmKK8VQJe70qx0W -CSmJqs4nRm+nuk2ltuFvgw +ru9rgfHr2x65YKjfBI7GWP/l/Ta5QvphufVlnnc5G/2FLqcMcfBriqvTSFZpetPV +hmvOzh1Px1RAcKBpEarr5cbGLh87AfuEoo2FFZW8PjOtlppZ6y1yoOmEbJmIMsAn +lL1Yz9v1Pex3Ztap/c5/MNVgmIYeH8nDO7i9fQnrYCIUuqe59uUJSkBY1euhfHpj +PWnAxHh2A8D6KLXwcp7EXjqcgrUPqvhlAHfFiOTAeuPoHM1obnuFHDwnslnZHZEE +mMvGbj670lXZprcuLDGN79GFokbu/YOujmv/IbRr0olW1xsJ1/I1VlUnaEWfGmYA +rpiB1P9kQJbnOnc54kdCSw -> ssh-rsa K9mW1w -nqyx27ciexwk/oXos09pQfE+AW29coAqjtBlIAkK6dccWEed6+0H6t01wHPHcOsa -Up7iuPSvTPxVlUmvq3ucje/sHTUhkUtxUblpnCeo/cXgqRw9zVC/JYwQKdWGK4SO -iYKNYQf5kn1Lb+UyM0k5UfrlW0Jb54X56/RohpqtbBU8h7+pV/z9JkhJWjrVcQcC -ggI3ozdTeSl1eq4h0X4NaV0GaNcWswfkt1XrwdESu+JeISxIepspQJws16ze6hm6 -qy/N5Dv87qj/TkCiX/VO1bcwiX0Ov3GzDFvox4Vppa3w5cTjqs5qWXOsh7R/cTAG -KAmmnXAY8ePosdVBoAABsQ --> \}uDq}-grease -/zbF6/hUJCRxa8DkbiRaQSDtqjqGxkSemr6GSQ ---- lh7tNWkwV2WfG1fsvYc9aOgwDK67PZ/Ppbdt7xsTRSs -$a:x)^RȹeNfWF.?ѭt OU3k/tNyXM \ No newline at end of file +cGaGqRmiQhlX1hixoeKp1Xu6moEMZEh1+x5YZf3Vf0IhIkgBjyarunup74IcRo+b +flL+6mLkhanhuLFf3xiPdNyRgDZS9h1PumzguGoHCRhxPtQz481AfWyNxoYY5/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 8ddffc4..387a91f 100644 Binary files a/secrets/resilio/plain/joseph.age and b/secrets/resilio/plain/joseph.age differ 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,22 @@ age-encryption.org/v1 -> ssh-rsa GxPFJQ -EOY7coZ/+zJfprLlvtrQDuRa/pyVbdkQGNSs89KiAwqL3kbKndC8RWiaNxqn6jBa -5lCsywMkI1YrStHjRFGX7JObLnqmD3dKr6Us0U5tjY1NJnIOK15b6NDc26DuhImA -TuobhD+bPCIh7qO/OW25yZ41JyJkK4HmjFsIQgM7vaY/FnH9YvRBAzwFLFzZ/+Ms -9p2vRacWk8Jy0ccMRYYxkqPkBK6aeb5wVTKPgk38bMTQU2kju+z00vwq+9ALUKBI -SKjhHHdSX9eMMaB0/oJitJ9q2pnpPE7ffR2ovBjjVlYmPbRvSG8xaEuVEZqgzWTT -vDeY65p9QE9wh3nm+3pOIQ +ntL8H9tZ8IBNGmHDcuMV0DrnuuH211EPsVEOf3GpSmiXfaj7nM6H1nG8a958e0LM +yTqz+glrIZBDElaBxNzMbncYqp2GWU9yvb7Cpq4HzGm8lc/b0oXwstR5SJXmI19i +MsXf19guHblsqIJKSpkB4GlyFb0I+nGCqSumppfDpYFw9kdUkJ2TR3pag6l3vG4N +17QQ52fkCR+0hyZGPbz8QGsWKP4ErcpGalLJFS71RK6GxIZE9pIzwHMGteuxKbkA +uK5WmdAiRGd1r0/Z9Xu8VreILz9zb3uDUZUrPSlQWcldZRNGWi2bIS7A7pGdfrpE +Gg/n6Z0IOpfEA2W4+xwu1Q -> ssh-rsa K9mW1w -nydcRo8zQgzZCLBVU78pwmBOV6nS8QWqu2PH2jltOi1kRKF6YtOdt0QM30KPaiE/ -lx+lCWwX8pexJqpH1liKCRg3KlaGskHBxMSDGs31SZkKWY8LiS+YgsnS662WkVDf -0+lFUj7RiTMX/t3NRvNhbS5TWJbHt4/jOYmiS7lfnCiUsBXHWrPGeaNeJzol1kND -CE174r13z3DHqQcAdxiXzDgkvzc0ae/5y/QgEWiJl31kBlG7the4CvOsls5gKpGb -gSll/tsqFaYFU0WI7kz2FVyQ4c8Fj7QppiWmWToCgPIOcR2jIeengBOJiH/l8vsq -A9shhz795oV2BfmSJAIAqg --> %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 31ab254..a1989df 100644 Binary files a/secrets/resilio/plain/resources.age and b/secrets/resilio/plain/resources.age differ diff --git a/secrets/resilio/plain/sync.age b/secrets/resilio/plain/sync.age index 5a775b7..43b1174 100644 Binary files a/secrets/resilio/plain/sync.age and b/secrets/resilio/plain/sync.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 6873f44..2b21db4 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -27,9 +27,9 @@ in "resilio/encrypted/sync.age".publicKeys = users ++ [ vm_strangervm ]; ## Read/Write Resilio Sync Secrets - "resilio/plain/dad.age".publicKeys = users; - "resilio/plain/joseph.age".publicKeys = users; - "resilio/plain/projects.age".publicKeys = users; - "resilio/plain/resources.age".publicKeys = users; - "resilio/plain/sync.age".publicKeys = users; + "resilio/plain/dad.age".publicKeys = users ++ [ gendry_terminals ]; + "resilio/plain/joseph.age".publicKeys = users ++ [ gendry_terminals ]; + "resilio/plain/projects.age".publicKeys = users ++ [ gendry_terminals ]; + "resilio/plain/resources.age".publicKeys = users ++ [ gendry_terminals ]; + "resilio/plain/sync.age".publicKeys = users ++ [ gendry_terminals ]; }