Merge pull request #14 from tlm-solutions/setup-chemo

This commit is contained in:
oxapentane - 2023-03-20 04:02:29 +01:00 committed by GitHub
commit cbc2649fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 170 additions and 27 deletions

View File

@ -1,5 +1,54 @@
{
"nodes": {
"chemo": {
"inputs": {
"crane": "crane",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1679280550,
"narHash": "sha256-dcThjjB1nq8+pRCk88jpem9pE8xgcNBmcXD9Mof2MtY=",
"owner": "tlm-solutions",
"repo": "chemo",
"rev": "31d61f1b4ab5e2ef2f7e1cf8fd8f27a5280dea6c",
"type": "github"
},
"original": {
"owner": "tlm-solutions",
"repo": "chemo",
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": [
"chemo",
"utils"
],
"nixpkgs": [
"chemo",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1679269454,
"narHash": "sha256-vzDw6uXwZ63iKuyO7rzN48uc7BZ1pnupdcNrWxQADXA=",
"owner": "ipetkov",
"repo": "crane",
"rev": "475de74fa29594a9d0a20bb032826d306be4d686",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"data-accumulator": {
"inputs": {
"naersk": [
@ -13,11 +62,11 @@
]
},
"locked": {
"lastModified": 1678328499,
"narHash": "sha256-02MUHiApaBDxK7MjHekyWkAY3M6i+1TsXY0lKpbeKGg=",
"lastModified": 1679280767,
"narHash": "sha256-h+mOKksNjbnvryPB28nWOeaGyFBAHqJ2Tu9BLeHMZgU=",
"owner": "tlm-solutions",
"repo": "data-accumulator",
"rev": "66014ff90a9ea164a3221d7e11e4dd8df3667f2a",
"rev": "fd14ca0586133027f695eba6ce3bc1be6667f701",
"type": "github"
},
"original": {
@ -93,6 +142,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1678901627,
@ -241,11 +306,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"lastModified": 1679139072,
"narHash": "sha256-Gtw2Yj8DfETie3u7iHv1y5Wt+plGRmp6nTQ0EEfaPho=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"rev": "08ef7dc8334521605a5c8b7086cc248e74ee338b",
"type": "github"
},
"original": {
@ -257,11 +322,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1678582009,
"narHash": "sha256-J8QzUOOv3/y97q19pGOz28gLC3lAUy1c4bWpsi5D460=",
"lastModified": 1679163677,
"narHash": "sha256-VC0tc3EjJZFPXgucFQAYMIHce5nJWYR0kVCk4TVg6gg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c34fc09c77172c4189df4594a0749e25a23cdd9b",
"rev": "c3912035d00ef755ab19394488b41feab95d2e40",
"type": "github"
},
"original": {
@ -289,6 +354,7 @@
},
"root": {
"inputs": {
"chemo": "chemo",
"data-accumulator": "data-accumulator",
"datacare": "datacare",
"documentation-src": "documentation-src",
@ -325,6 +391,33 @@
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"chemo",
"crane",
"flake-utils"
],
"nixpkgs": [
"chemo",
"crane",
"nixpkgs"
]
},
"locked": {
"lastModified": 1677812689,
"narHash": "sha256-EakqhgRnjVeYJv5+BJx/NZ7/eFTMBxc4AhICUNquhUg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e53e8853aa7b0688bc270e9e6a681d22e01cf299",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
@ -333,11 +426,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1678590185,
"narHash": "sha256-scvu8HegWwbcvPKjh6M1DnpPYAv4EnP1krsRPItoQ+E=",
"lastModified": 1679194991,
"narHash": "sha256-SSJ/NvhXJeDzSgfEjKO1V/2olI4UlEAxK54DVWJIPjA=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9e98f7a442b0e318de9cce757675c2ab922bdf2b",
"rev": "08a0b5f25a73130869b3cc375eaf0e6ff317435e",
"type": "github"
},
"original": {
@ -385,11 +478,11 @@
]
},
"locked": {
"lastModified": 1678328168,
"narHash": "sha256-3Ekz6Ocy2MEJHd1S67lBKsm/ndTNsdJ29bHqvVnKqAo=",
"lastModified": 1679280726,
"narHash": "sha256-Q4AtmR9IeMRM9uLBIoet99MCm6YDCqE4SDZzx55WobU=",
"owner": "tlm-solutions",
"repo": "telegram-decoder",
"rev": "b95ffffd623b1a3004e48b19f37d0d558ce7970b",
"rev": "2631bfffdc5a40f539e2a640961f115b760e5a85",
"type": "github"
},
"original": {
@ -405,11 +498,11 @@
]
},
"locked": {
"lastModified": 1678668058,
"narHash": "sha256-WHTBvjrs3JI6TQ2wiwrcfoZyGiwhmgf83Sv/NFHwcTU=",
"lastModified": 1679280626,
"narHash": "sha256-Im9VhJm99E6C2oI3u3ZG66EF/xTsoauv/JmbQu+Vk58=",
"owner": "tlm-solutions",
"repo": "tlms.rs",
"rev": "bebb4e4457fc6a4c6a1fa87c0eb8b813548479b7",
"rev": "f9d6b514fb4165acd8c779bb0708f078cf3ecf94",
"type": "github"
},
"original": {
@ -463,6 +556,21 @@
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wartrammer": {
"inputs": {
"naersk": [

View File

@ -107,6 +107,11 @@
url = "github:tlm-solutions/tlms.rs";
inputs.nixpkgs.follows = "nixpkgs";
};
chemo = {
url = "github:tlm-solutions/chemo";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -125,6 +130,7 @@
, trekkie
, wartrammer
, windshield
, chemo
, ...
}:
let
@ -141,6 +147,7 @@
sops-nix.nixosModules.sops
state-api.nixosModules.default
trekkie.nixosModules.default
chemo.nixosModules.default
{
nixpkgs.overlays = [
datacare.overlays.default
@ -150,6 +157,7 @@
funnel.overlays.default
data-accumulator.overlays.default
windshield.overlays.default
chemo.overlays.default
(final: prev: {
inherit documentation-src;
options-docs = (pkgs.nixosOptionsDoc {

View File

@ -0,0 +1,31 @@
{ config, ... }:
{
TLMS.chemo = {
enable = true;
host = "0.0.0.0"; # this is the receiving grps part
port = 8090;
database = {
host = "127.0.0.1";
port = config.services.postgresql.port;
passwordFile = config.sops.secrets.postgres_password.path;
user = "tlms";
database = "tlms";
};
GRPC = [
{
name = "API";
host = config.TLMS.api.GRPC.host;
port = config.TLMS.api.GRPC.port;
}
{
name = "FUNNEL";
host = config.TLMS.funnel.GRPC.host;
port = config.TLMS.funnel.GRPC.port;
}
];
};
systemd.services."chemo" = {
after = [ "postgresql.service" ];
wants = [ "postgresql.service" ];
};
}

View File

@ -13,14 +13,9 @@
};
GRPC = [
{
name = "API";
host = config.TLMS.api.GRPC.host;
port = config.TLMS.api.GRPC.port;
}
{
name = "FUNNEL";
host = config.TLMS.funnel.GRPC.host;
port = config.TLMS.funnel.GRPC.port;
name = "CHEMO";
host = config.TLMS.chemo.host;
port = config.TLMS.chemo.port;
}
];
};

View File

@ -14,5 +14,6 @@
./socket.nix
./website.nix
./trekkie.nix
./chemo.nix
];
}

View File

@ -19,7 +19,7 @@
];
};
environment.systemPackages = [ inputs.tlms-rs.packages.x86_64-linux.run-migration inputs.tlms-rs.packages.x86_64-linux.run-migration-based inputs.tlms-rs.packages.x86_64-linux.yeet-data];
environment.systemPackages = [ inputs.tlms-rs.packages.x86_64-linux.run-migration-based ];
systemd.services.postgresql = {
unitConfig = {