straylight: build tracker from git input
This commit is contained in:
Binary file not shown.
+11
-15
@@ -1,28 +1,24 @@
|
|||||||
# tracker: single-host project tracker web app (hackerman edition).
|
# tracker: single-host project tracker web app (hackerman edition).
|
||||||
# Wraps the prebuilt Go binary in ./tracker-bin; rebuild it with
|
# Built from the git repo (https://git.wntrmute.dev/kyle/tracker) via the
|
||||||
# CGO_ENABLED=0 go build -o tracker-bin .
|
# `tracker` flake input; see the flake.nix in that repo for the package.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.tracker;
|
cfg = config.services.tracker;
|
||||||
|
|
||||||
trackerPackage = pkgs.stdenvNoCC.mkDerivation {
|
|
||||||
pname = "tracker";
|
|
||||||
version = "0.1.0";
|
|
||||||
src = ./tracker-bin;
|
|
||||||
dontUnpack = true;
|
|
||||||
dontBuild = true;
|
|
||||||
installPhase = ''
|
|
||||||
install -Dm755 $src $out/bin/tracker
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.tracker = {
|
options.services.tracker = {
|
||||||
enable = mkEnableOption "tracker project tracker web app";
|
enable = mkEnableOption "tracker project tracker web app";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = inputs.tracker.packages.x86_64-linux.default;
|
||||||
|
defaultText = literalExpression "inputs.tracker.packages.x86_64-linux.default";
|
||||||
|
description = "The tracker package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = ":8420";
|
default = ":8420";
|
||||||
@@ -53,7 +49,7 @@ in
|
|||||||
User = "tracker";
|
User = "tracker";
|
||||||
Group = "tracker";
|
Group = "tracker";
|
||||||
StateDirectory = "tracker";
|
StateDirectory = "tracker";
|
||||||
ExecStart = "${trackerPackage}/bin/tracker -addr ${cfg.address} -db /var/lib/tracker/tracker.db";
|
ExecStart = "${cfg.package}/bin/tracker -addr ${cfg.address} -db /var/lib/tracker/tracker.db";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
kte.url = "git+https://git.wntrmute.dev/kyle/kte";
|
kte.url = "git+https://git.wntrmute.dev/kyle/kte";
|
||||||
kte.inputs.nixpkgs.follows = "nixpkgs";
|
kte.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
tracker.url = "git+https://git.wntrmute.dev/kyle/tracker";
|
||||||
|
tracker.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
lector.url = "github:kisom/lector";
|
lector.url = "github:kisom/lector";
|
||||||
lector.inputs.nixpkgs.follows = "nixpkgs";
|
lector.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user