refactor file structure

This commit is contained in:
Joakim Repomaa
2025-02-02 20:24:07 +02:00
parent 908b26449d
commit a201aa2de0
29 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,39 @@
{ 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";
};
};
};
services.caddy.virtualHosts = {
"${fqdn}".extraConfig = ''
reverse_proxy localhost:${toString port}
'';
};
}