my system configurations ^-^
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

import

willow 193afb15 4a41692a

+34 -10
+1
modules/shared/home/home.nix
··· 4 4 imports = [ 5 5 ./programs 6 6 ./scripts 7 + ./services 7 8 ./themes 8 9 ]; 9 10
+3
modules/shared/home/services/default.nix
··· 1 + { 2 + imports = [./syncthing.nix]; 3 + }
+30 -10
modules/shared/home/services/syncthing.nix
··· 1 1 { 2 + config, 3 + osConfig, 4 + pkgs, 2 5 lib, 3 - pkgs, 4 - config, 5 6 ... 6 7 }: let 7 8 inherit (pkgs.stdenv) isDarwin; 8 - shared = ["earthy" "starling"]; 9 + inherit (osConfig.settings.system) hostName; 10 + inherit (osConfig.age) secrets; 11 + 12 + devices = { 13 + # this is an anti-pattern as cleartext is placed into nix store, doesn't matter in this case 14 + starling.id = builtins.readFile secrets.syncthingEarthy.path; 15 + earthy.id = builtins.readFile secrets.syncthingStarling.path; 16 + }; 17 + allDevices = builtins.attrNames devices; 9 18 in { 10 19 services.syncthing = { 11 20 enable = true; 21 + 22 + # key = 23 + # if hostName == "starling" 24 + # then secrets.syncthingStarlingKey 25 + # else if hostName == "earthy" 26 + # then secrets.syncthingEarthyKey 27 + # else null; 28 + 29 + # cert = 30 + # if hostName == "starling" 31 + # then secrets.syncthingStarlingCert 32 + # else if hostName == "earthy" 33 + # then secrets.syncthingEarthyCert 34 + # else null; 35 + 12 36 settings = { 13 - devices = { 14 - # this is an anti-pattern as cleartext is placed into nix store, doesn't matter in this case 15 - starling.id = builtins.readFile config.age.secrets.syncthingEarthy.path; 16 - earthy.id = builtins.readFile config.age.secrets.syncthingStarling.path; 17 - }; 37 + inherit devices; 18 38 folders = { 19 39 docs = { 20 40 label = "Documents"; 21 41 path = config.xdg.userDirs.documents; 22 - devices = shared; 42 + devices = allDevices; 23 43 }; 24 44 music = { 25 45 label = "Music"; 26 46 path = config.xdg.userDirs.music; 27 - devices = shared; 47 + devices = allDevices; 28 48 }; 29 49 # pictures = { 30 50 # label = "Pictures";