refactor(ops/modules): Rename git-serving -> josh
cgit has its own module now Change-Id: I9b4cc322374517b8bd3db43345831e2bf43c4bb1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5295 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
cb8f050b9c
commit
c72c1efdeb
3 changed files with 8 additions and 8 deletions
33
ops/modules/josh.nix
Normal file
33
ops/modules/josh.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Configures the public josh instance for serving the depot.
|
||||
{ config, depot, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.depot.josh;
|
||||
in
|
||||
{
|
||||
options.services.depot.josh = with lib; {
|
||||
enable = mkEnableOption "Enable josh for serving the depot";
|
||||
|
||||
port = mkOption {
|
||||
description = "Port on which josh should listen";
|
||||
type = types.int;
|
||||
default = 5674;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Run josh for the depot.
|
||||
systemd.services.josh = {
|
||||
description = "josh - partial cloning of monorepos";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.git pkgs.bash ];
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
StateDirectory = "josh";
|
||||
Restart = "always";
|
||||
ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue