add radish configuration
This commit is contained in:
39
freun.dev/workout-tracker.nix
Normal file
39
freun.dev/workout-tracker.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
fqdn = "fit.freun.dev";
|
||||
port = 3322;
|
||||
version = "1.18.1";
|
||||
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-KBwGV6i1tqZNUvqEYRxYzLWo/MBEU7/7LtJSqlWlPmw=";
|
||||
};
|
||||
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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user