adjusting nix module to changes in datacare

This commit is contained in:
Tassilo - 2023-05-14 17:28:02 +02:00
parent ca8a3c0e3d
commit e9836213a4
Signed by: revol-xut
GPG Key ID: 4F56FF7759627D07
5 changed files with 14 additions and 11 deletions

View File

@ -42,7 +42,7 @@
datacare = { datacare = {
url = "github:tlm-solutions/datacare"; url = "github:tlm-solutions/datacare";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; #nixpkgs.follows = "nixpkgs";
naersk.follows = "naersk"; naersk.follows = "naersk";
tlms-rs.follows = "tlms-rs"; tlms-rs.follows = "tlms-rs";
utils.follows = "flake-utils"; utils.follows = "flake-utils";
@ -304,13 +304,13 @@
echo -e "Service\t\tPort" echo -e "Service\t\tPort"
echo -e "SSH:\t\t2223\troot:lol" echo -e "SSH:\t\t2223\troot:lol"
echo -e "trekkie:\t${toString cfg.TLMS.trekkie.port}" echo -e "trekkie:\t${toString cfg.TLMS.trekkie.port}"
echo -e "datacare:\t${toString cfg.TLMS.datacare.port}" echo -e "datacare:\t${toString cfg.TLMS.datacare.http.port}"
echo -e "data-accumulator:\t${toString cfg.TLMS.dataAccumulator.port}" echo -e "data-accumulator:\t${toString cfg.TLMS.dataAccumulator.port}"
echo -e "funnel:\t${toString cfg.TLMS.funnel.defaultWebsocket.port}" echo -e "funnel:\t${toString cfg.TLMS.funnel.defaultWebsocket.port}"
echo echo
set -x set -x
export QEMU_NET_OPTS="hostfwd=tcp::2223-:22,hostfwd=tcp::80-:80,hostfwd=tcp::8050-:${toString cfg.TLMS.trekkie.port},hostfwd=tcp::8060-:${toString cfg.TLMS.datacare.port},hostfwd=tcp::8070-:${toString cfg.TLMS.dataAccumulator.port},hostfwd=tcp::8080-:${toString cfg.TLMS.funnel.defaultWebsocket.port}" export QEMU_NET_OPTS="hostfwd=tcp::2223-:22,hostfwd=tcp::80-:80,hostfwd=tcp::8050-:${toString cfg.TLMS.trekkie.port},hostfwd=tcp::8060-:${toString cfg.TLMS.datacare.http.port},hostfwd=tcp::8070-:${toString cfg.TLMS.dataAccumulator.port},hostfwd=tcp::8080-:${toString cfg.TLMS.funnel.defaultWebsocket.port}"
echo "running the vm now..." echo "running the vm now..."
${self.packages."x86_64-linux".fuck-microvm}/bin/run-staging-data-hoarder-vm ${self.packages."x86_64-linux".fuck-microvm}/bin/run-staging-data-hoarder-vm
''); '');

View File

@ -1,3 +1,3 @@
{ pkgs, config, lib, ... }: { { pkgs, config, lib, ... }: {
deployment-TLMS.domain = lib.mkForce "local.tlm.solutions"; deployment-TLMS.domain = lib.mkForce "local.tlm.solutions";
} }

View File

@ -5,5 +5,5 @@
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ]; boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
} }

View File

@ -34,7 +34,7 @@ in
let let
wg-addr-pred = lib.assertMsg (!(isNull config.deployment-TLMS.net.wg.addr4)) "to add system to monitoring, add it to TLMS wireguard first!"; wg-addr-pred = lib.assertMsg (!(isNull config.deployment-TLMS.net.wg.addr4)) "to add system to monitoring, add it to TLMS wireguard first!";
in in
lib.mkIf (cfg.enable && wg-addr-pred) { lib.mkIf (cfg.enable && wg-addr-pred) {
# prometheus node exporter # prometheus node exporter
services.prometheus.exporters = { services.prometheus.exporters = {
node = { node = {

View File

@ -1,8 +1,11 @@
{ config, ... }: { { config, ... }: {
TLMS.datacare = { TLMS.datacare = {
enable = true; enable = true;
host = "127.0.0.1"; http = {
port = 8070; host = "127.0.0.1";
port = 8070;
};
database = { database = {
host = "127.0.0.1"; host = "127.0.0.1";
port = config.services.postgresql.port; port = config.services.postgresql.port;
@ -37,11 +40,11 @@
enableACME = true; enableACME = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = with config.TLMS.datacare; "http://${host}:${toString port}/"; proxyPass = with config.TLMS.datacare.http; "http://${host}:${toString port}/";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
more_set_headers "Access-Control-Allow-Credentials: true"; more_set_headers "Access-Control-Allow-Credentials: true";
''; '';
}; };
}; };
}; };