diff --git a/modules/git.nix b/modules/git.nix index 7b0b0ee..90ac836 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,53 +1,41 @@ -{ config, ... }: +{ config, pkgs, ... }: let - user = "git"; - group = "gitolite"; httpPort = 8022; in { imports = [ ./consul-catalog.nix ]; - services = { - gitolite = { - enable = true; - adminPubkey = builtins.head (import ./keys.nix).dwagner; - - inherit user group; - }; - - gitweb = { - projectroot = "${config.services.gitolite.dataDir}/repositories"; - }; + users.users.git = { + isNormalUser = true; + shell = "${pkgs.git}/bin/git-shell"; + openssh.authorizedKeys.keys = (import ./keys.nix).dwagner; + }; - nginx = { + services = { + cgit.git = { enable = true; - - recommendedOptimisation = true; - recommendedGzipSettings = true; - recommendedProxySettings = true; - - virtualHosts."_".listen = [ - { - addr = "0.0.0.0"; - port = httpPort; - } - { - addr = "[::]"; - port = httpPort; - } - ]; - - gitweb = { - enable = true; - inherit group; - location = ""; + scanPath = "/srv/git"; + settings = { + enable-git-config = true; + clone-url = "git@nuc:/srv/git/$CGIT_REPO_URL"; }; }; + nginx.virtualHosts.git.listen = [ + { + addr = "0.0.0.0"; + port = httpPort; + } + { + addr = "[::]"; + port = httpPort; + } + ]; + consul.catalog = [ { - name = "gitweb"; + name = "cgit"; port = httpPort; tags = (import ./lib/traefik.nix).tagsForHost "git"; } diff --git a/modules/grafana/dashboards/nixos.json b/modules/grafana/dashboards/nixos.json index e43970f..778c133 100644 --- a/modules/grafana/dashboards/nixos.json +++ b/modules/grafana/dashboards/nixos.json @@ -56,7 +56,7 @@ "showLineNumbers": false, "showMiniMap": false }, - "content": "* [Alertmanager](http://nuc:9093)\n* [Grafana](http://nuc:3000)\n* [Gitolite](http://nuc:8022)\n* [Node Exporter (nuc)](http://nuc:9100)\n* [Ntfy (nuc)](http://nuc:8080)\n* [Prometheus](http://nuc:9090)", + "content": "* [Alertmanager](http://nuc:9093)\n* [Grafana](http://nuc:3000)\n* [Git](http://nuc:8022)\n* [Node Exporter (nuc)](http://nuc:9100)\n* [Ntfy (nuc)](http://nuc:8080)\n* [Prometheus](http://nuc:9090)", "mode": "markdown" }, "pluginVersion": "9.4.9",