fix(ops/modules): re-add cheddar highlighting server
This was deleted when removing the Sourcegraph module, but it turns out it is also needed by panettone. Change-Id: I8f14165bf783743247894c2b64882fbb032ffbf8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12295 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
parent
8b624f93bf
commit
bfab474d0c
2 changed files with 33 additions and 0 deletions
29
ops/modules/cheddar.nix
Normal file
29
ops/modules/cheddar.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ depot, config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.depot.cheddar;
|
||||
description = "cheddar - markdown/highlighting server";
|
||||
in
|
||||
{
|
||||
options.services.depot.cheddar = with lib; {
|
||||
enable = mkEnableOption description;
|
||||
port = mkOption {
|
||||
description = "Port on which cheddar should listen";
|
||||
type = types.int;
|
||||
default = 4238;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.cheddar-server = {
|
||||
inherit description;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = "${depot.tools.cheddar}/bin/cheddar --listen 0.0.0.0:${toString cfg.port} --sourcegraph-server";
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue