Compare commits
No commits in common. "11618adc763ae4500cae8730af13c45a96c1b59f" and "2e20dabf069b03da88b1474e90959d12a905b485" have entirely different histories.
11618adc76
...
2e20dabf06
2 changed files with 0 additions and 54 deletions
|
@ -35,7 +35,6 @@
|
||||||
"mosh"
|
"mosh"
|
||||||
"amule"
|
"amule"
|
||||||
"adguard-home"
|
"adguard-home"
|
||||||
"garmin-grafana"
|
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
./disko.nix
|
./disko.nix
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
garmin-grafana-flake = builtins.getFlake "github:NixOS/nixpkgs/1f03fefb44665cd2377912033de22ffaba2be48d";
|
|
||||||
inherit (garmin-grafana-flake.legacyPackages.${pkgs.system}) garmin-grafana;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
users.users.garmin-grafana = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "garmin-grafana";
|
|
||||||
extraGroups = [ "garmin-grafana" ];
|
|
||||||
home = "/var/lib/garmin-grafana";
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups.garmin-grafana = { };
|
|
||||||
|
|
||||||
systemd.services.garmin-grafana = {
|
|
||||||
description = "garmin-grafana";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
environment = {
|
|
||||||
INFLUXDB_HOST = "localhost";
|
|
||||||
INFLUXDB_PORT = "8086"; # it's hardcoded in the influxdb NixOS module
|
|
||||||
INFLUXDB_USERNAME = "garmin-grafana";
|
|
||||||
INFLUXDB_PASSWORD = "password"; # FIXME terrible but the databse is not exposed at least
|
|
||||||
INFLUXDB_DATABASE = "garmin-stats";
|
|
||||||
GARMINCONNECT_IS_CN = "False";
|
|
||||||
USER_TIMEZONE = "Europe/Rome";
|
|
||||||
KEEP_FIT_FILES = "True";
|
|
||||||
ALWAYS_PROCESS_FIT_FILES = "True";
|
|
||||||
# MANUAL_START_DATE = "2024-06-01";
|
|
||||||
# MANUAL_END_DATE = "2025-12-31";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = lib.getExe garmin-grafana;
|
|
||||||
Group = "garmin-grafana";
|
|
||||||
User = "garmin-grafana";
|
|
||||||
WorkingDirectory = "/var/lib/garmin-grafana";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# garmin-grafana uses influxdb V1, probably it's the only software I'll ever use using the V1
|
|
||||||
# so I"m keeping its declaration inside this module
|
|
||||||
services.influxdb.enable = true;
|
|
||||||
|
|
||||||
environment.persistence."/persist".directories = [
|
|
||||||
"/var/lib/garmin-grafana"
|
|
||||||
config.services.influxdb.dataDir
|
|
||||||
];
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue