Monorepo for Tangled tangled.org

nix: add tap service for spindle #979

open opened by boltless.me targeting master from sl/spindle-rewrite
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mckguakeqf22
+36
Diff #2
+1
flake.nix
··· 328 328 imports = [./nix/modules/spindle.nix]; 329 329 330 330 services.tangled.spindle.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.spindle; 331 + services.tangled.spindle.tap-package = lib.mkDefault self.packages.${pkgs.system}.tap; 331 332 }; 332 333 nixosModules.did-method-plc = { 333 334 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 { ··· 114 124 config = mkIf cfg.enable { 115 125 virtualisation.docker.enable = true; 116 126 127 + systemd.services.spindle-tap = { 128 + description = "spindle tap service"; 129 + after = ["network.target" "docker.service"]; 130 + wantedBy = ["multi-user.target"]; 131 + serviceConfig = { 132 + LogsDirectory = "spindle-tap"; 133 + StateDirectory = "spindle-tap"; 134 + Environment = [ 135 + "TAP_BIND=:2480" 136 + "TAP_PLC_URL=${cfg.server.plcUrl}" 137 + "TAP_RELAY_URL=${cfg.atpRelayUrl}" 138 + "TAP_DATABASE_URL=sqlite:///var/lib/spindle-tap/tap.db" 139 + "TAP_RETRY_TIMEOUT=3s" 140 + "TAP_COLLECTION_FILTERS=${concatStringsSep "," [ 141 + "sh.tangled.repo" 142 + "sh.tangled.repo.collaborator" 143 + "sh.tangled.spindle.member" 144 + ]}" 145 + ]; 146 + ExecStart = "${getExe cfg.tap-package} run"; 147 + }; 148 + }; 149 + 117 150 systemd.services.spindle = { 118 151 description = "spindle service"; 119 152 after = ["network.target" "docker.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; ··· 95 96 }; 96 97 services.tangled.spindle = { 97 98 enable = true; 99 + atpRelayUrl = relayUrl; 98 100 server = { 99 101 owner = envVar "TANGLED_VM_SPINDLE_OWNER"; 100 102 hostname = envVarOr "TANGLED_VM_SPINDLE_HOST" "localhost:6555";

History

3 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
nix: add tap service for spindle
1/3 failed, 2/3 success
expand
no conflicts, ready to merge
expand 0 comments
1 commit
expand
nix: add tap service for spindle
1/3 failed, 2/3 success
expand
expand 0 comments
1 commit
expand
nix: add tap service for spindle
1/3 failed, 2/3 success
expand
expand 0 comments