Signed-off-by: Seongmin Lee git@boltless.me
+1
flake.nix
+1
flake.nix
···
331
imports = [./nix/modules/spindle.nix];
332
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;
335
};
336
nixosModules.did-method-plc = {
337
lib,
+33
nix/modules/spindle.nix
+33
nix/modules/spindle.nix
···
17
type = types.package;
18
description = "Package to use for the spindle";
19
};
20
21
server = {
22
listenAddr = mkOption {
···
114
config = mkIf cfg.enable {
115
virtualisation.docker.enable = true;
116
117
systemd.services.spindle = {
118
description = "spindle service";
119
after = ["network.target" "docker.service"];
···
17
type = types.package;
18
description = "Package to use for the spindle";
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
+
};
30
31
server = {
32
listenAddr = mkOption {
···
124
config = mkIf cfg.enable {
125
virtualisation.docker.enable = true;
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
+
150
systemd.services.spindle = {
151
description = "spindle service";
152
after = ["network.target" "docker.service"];
+2
nix/vm.nix
+2
nix/vm.nix
···
19
20
plcUrl = envVarOr "TANGLED_VM_PLC_URL" "https://plc.directory";
21
jetstream = envVarOr "TANGLED_VM_JETSTREAM_ENDPOINT" "wss://jetstream1.us-west.bsky.network/subscribe";
22
in
23
nixpkgs.lib.nixosSystem {
24
inherit system;
···
95
};
96
services.tangled.spindle = {
97
enable = true;
98
server = {
99
owner = envVar "TANGLED_VM_SPINDLE_OWNER";
100
hostname = envVarOr "TANGLED_VM_SPINDLE_HOST" "localhost:6555";
···
19
20
plcUrl = envVarOr "TANGLED_VM_PLC_URL" "https://plc.directory";
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";
23
in
24
nixpkgs.lib.nixosSystem {
25
inherit system;
···
96
};
97
services.tangled.spindle = {
98
enable = true;
99
+
atpRelayUrl = relayUrl;
100
server = {
101
owner = envVar "TANGLED_VM_SPINDLE_OWNER";
102
hostname = envVarOr "TANGLED_VM_SPINDLE_HOST" "localhost:6555";
History
4 rounds
0 comments
boltless.me
submitted
#3
1 commit
expand
collapse
nix: add tap service for spindle
Signed-off-by: Seongmin Lee <git@boltless.me>
1/3 failed, 2/3 success
expand
collapse
no conflicts, ready to merge
expand 0 comments
boltless.me
submitted
#2
1 commit
expand
collapse
nix: add tap service for spindle
Signed-off-by: Seongmin Lee <git@boltless.me>
1/3 failed, 2/3 success
expand
collapse
expand 0 comments
boltless.me
submitted
#1
1 commit
expand
collapse
nix: add tap service for spindle
Signed-off-by: Seongmin Lee <git@boltless.me>
1/3 failed, 2/3 success
expand
collapse
expand 0 comments
boltless.me
submitted
#0
1 commit
expand
collapse
nix: add tap service for spindle
Signed-off-by: Seongmin Lee <git@boltless.me>