blob: 651e0f90813a9333ed3543d56b1564d4cd2eca11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ config, lib, pkgs, ... }:
let
ports = import ./ports.nix;
in
{
imports = [
./default.nix
# Not yet published; will be eventually.
/home/martin/repos/exercise-log/service.nix
/home/martin/repos/hosehawk/services/hosenest.nix
/home/martin/repos/hosehawk/services/hosehawk.nix
];
exerciseLog = {
enable = true;
port = ports.exerciseLog;
};
services.hosenest = {
enable = true;
port = ports.hosehawk;
};
services.hosehawk = {
enable = true;
hosenestUrl = "http://localhost:${toString ports.hosehawk}/";
prometheusPort = ports.prometheusHoseHawk;
};
local.services.monitoring.prometheusScrapeConfigs = [
{
job_name = "exercise-log";
scrape_interval = "10m";
static_configs = [{
targets = ["localhost:${toString ports.exerciseLog}"];
}];
}
{
job_name = "hosehawk";
static_configs = [{
targets = ["localhost:${toString ports.prometheusHoseHawk}"];
}];
}
];
local.services.restic-database-backups.sqliteDatabases = {
exercise-log = "/var/lib/exercise-log/database.sqlite";
};
}
|