This commit is contained in:
Joakim Repomaa
2025-02-06 16:22:34 +02:00
committed by Joakim Repomaa
parent 983e313e11
commit 7a24ac5fe6
21 changed files with 233 additions and 193 deletions

View File

@@ -0,0 +1,35 @@
{ pkgs, ... }:
let
fqdn = "fit.freun.dev";
port = 3322;
version = "2.0.3";
in
{
services.workout-tracker = {
enable = true;
inherit port;
package = pkgs.stdenv.mkDerivation {
name = "workout-tracker";
src = pkgs.fetchurl {
url = "https://github.com/jovandeginste/workout-tracker/releases/download/v${version}/workout-tracker-v${version}-linux-amd64.tar.gz";
hash = "sha256-kcchO+7HQwmpYRXqrTtyHWDqy7DkKugO+PJRucboycE=";
};
nativeBuildInputs = [
pkgs.autoPatchelfHook
];
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -m755 -D workout-tracker $out/bin/workout-tracker
runHook postInstall
'';
meta = with pkgs.lib; {
description = "A simple workout tracker";
license = licenses.mit;
mainProgram = "workout-tracker";
};
};
};
modules.webserver.vHosts.${fqdn}.locations."/".proxy = "http://localhost:${toString port}";
}