Move gerrit oauth to flake input
Previously, we used fetchurl to get the gerrit oauth plugin. This had
the disadvantage that auto-updates did not work, and additionally did
not have the advantage that the config would continue to work with old
versions as the artifact URL was removed when a new version was built.
This will allow us to update gerrit oauth with 'nix flake lock' and will
break no more commonly than before
Change-Id: I6d82752c380aea6301c26de169b01480d260a830
Reviewed-on: https://git.clicks.codes/c/Clicks/NixFiles/+/201
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/common/gerrit.nix b/modules/common/gerrit.nix
index 87793b1..27588eb 100644
--- a/modules/common/gerrit.nix
+++ b/modules/common/gerrit.nix
@@ -1,4 +1,4 @@
-{ pkgs, config, lib, base, system, ... }:
+{ pkgs, config, lib, base, system, gerrit-oauth, ... }:
let cfg = config.services.gerrit;
in lib.recursiveUpdate {
users.users.gerrit = {
@@ -114,10 +114,7 @@
};
plugins = [
- (pkgs.fetchurl {
- url = "https://gerrit-ci.gerritforge.com/job/plugin-oauth-bazel-master-master/55/artifact/bazel-bin/plugins/oauth/oauth.jar";
- hash = "sha256-Qil1CIh/+XC15rKfW0iYR9u370eF2TXnCNSmQfr+7/8=";
- })
+ (builtins.path { path = gerrit-oauth; name = "oauth.jar"; })
];
builtinPlugins = [
"codemirror-editor"