Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

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

nix: add tap service for spindle

Signed-off-by: Seongmin Lee <git@boltless.me>

+36
+1
flake.nix
··· 331 331 imports = [./nix/modules/spindle.nix]; 332 332 333 333 services.tangled.spindle.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.spindle; 334 + services.tangled.spindle.tap-package = lib.mkDefault self.packages.${pkgs.system}.tap; 334 335 }; 335 336 nixosModules.did-method-plc = { 336 337 lib,
+33
nix/modules/spindle.nix
··· 17 17 type = types.package; 18 18 description = "Package to use for the spindle"; 19 19 }; 20 + tap-package = mkOption { 21 + type = types.package; 22 + description = "Package to use for the spindle"; 23 + }; 24 + 25 + atpRelayUrl = mkOption { 26 + type = types.str; 27 + default = "https://relay1.us-east.bsky.network"; 28 + description = "atproto relay"; 29 + }; 20 30 21 31 server = { 22 32 listenAddr = mkOption { ··· 123 113 124 114 config = mkIf cfg.enable { 125 115 virtualisation.docker.enable = true; 116 + 117 + systemd.services.spindle-tap = { 118 + description = "spindle tap service"; 119 + after = ["network.target" "docker.service"]; 120 + wantedBy = ["multi-user.target"]; 121 + serviceConfig = { 122 + LogsDirectory = "spindle-tap"; 123 + StateDirectory = "spindle-tap"; 124 + Environment = [ 125 + "TAP_BIND=:2480" 126 + "TAP_PLC_URL=${cfg.server.plcUrl}" 127 + "TAP_RELAY_URL=${cfg.atpRelayUrl}" 128 + "TAP_DATABASE_URL=sqlite:///var/lib/spindle-tap/tap.db" 129 + "TAP_RETRY_TIMEOUT=3s" 130 + "TAP_COLLECTION_FILTERS=${concatStringsSep "," [ 131 + "sh.tangled.repo" 132 + "sh.tangled.repo.collaborator" 133 + "sh.tangled.spindle.member" 134 + ]}" 135 + ]; 136 + ExecStart = "${getExe cfg.tap-package} run"; 137 + }; 138 + }; 126 139 127 140 systemd.services.spindle = { 128 141 description = "spindle service";
+2
nix/vm.nix
··· 19 19 20 20 plcUrl = envVarOr "TANGLED_VM_PLC_URL" "https://plc.directory"; 21 21 jetstream = envVarOr "TANGLED_VM_JETSTREAM_ENDPOINT" "wss://jetstream1.us-west.bsky.network/subscribe"; 22 + relayUrl = envVarOr "TANGLED_VM_RELAY_URL" "https://relay1.us-east.bsky.network"; 22 23 in 23 24 nixpkgs.lib.nixosSystem { 24 25 inherit system; ··· 96 95 }; 97 96 services.tangled.spindle = { 98 97 enable = true; 98 + atpRelayUrl = relayUrl; 99 99 server = { 100 100 owner = envVar "TANGLED_VM_SPINDLE_OWNER"; 101 101 hostname = envVarOr "TANGLED_VM_SPINDLE_HOST" "localhost:6555";