diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index 66f5890f8..1965a661f 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -11,8 +11,8 @@ in "${depot.path}/ops/modules/cgit/default.nix" "${depot.path}/ops/modules/clbot.nix" "${depot.path}/ops/modules/gerrit-queue.nix" - "${depot.path}/ops/modules/git-serving.nix" "${depot.path}/ops/modules/irccat.nix" + "${depot.path}/ops/modules/josh.nix" "${depot.path}/ops/modules/monorepo-gerrit.nix" "${depot.path}/ops/modules/nixery.nix" "${depot.path}/ops/modules/oauth2_proxy.nix" @@ -394,7 +394,7 @@ in # Run cgit & josh to serve git cgit.enable = true; - git-serving.enable = true; + josh.enable = true; # Configure backups to GleSYS restic = { diff --git a/ops/modules/git-serving.nix b/ops/modules/josh.nix similarity index 69% rename from ops/modules/git-serving.nix rename to ops/modules/josh.nix index 57f08cbc5..be9e9e966 100644 --- a/ops/modules/git-serving.nix +++ b/ops/modules/josh.nix @@ -2,13 +2,13 @@ { config, depot, lib, pkgs, ... }: let - cfg = config.services.depot.git-serving; + cfg = config.services.depot.josh; in { - options.services.depot.git-serving = with lib; { - enable = mkEnableOption "Enable cgit & josh configuration"; + options.services.depot.josh = with lib; { + enable = mkEnableOption "Enable josh for serving the depot"; - joshPort = mkOption { + port = mkOption { description = "Port on which josh should listen"; type = types.int; default = 5674; @@ -26,7 +26,7 @@ in DynamicUser = true; StateDirectory = "josh"; Restart = "always"; - ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.joshPort} --remote https://cl.tvl.fyi/"; + ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/"; }; }; }; diff --git a/ops/modules/www/code.tvl.fyi.nix b/ops/modules/www/code.tvl.fyi.nix index 4c182d34f..3f34a9422 100644 --- a/ops/modules/www/code.tvl.fyi.nix +++ b/ops/modules/www/code.tvl.fyi.nix @@ -22,7 +22,7 @@ # Git operations on depot.git hit josh location /depot.git { - proxy_pass http://localhost:${toString config.services.depot.git-serving.joshPort}; + proxy_pass http://localhost:${toString config.services.depot.josh.port}; } # Git clone operations on '/' should be redirected to josh now.