services/hound: remove

This commit is contained in:
zowoq 2023-04-18 11:33:27 +10:00
parent 4b18fba5f5
commit 3d2ec06ddb
10 changed files with 0 additions and 721 deletions

View file

@ -1,39 +0,0 @@
name: "Update hound"
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "51 2 * * 3"
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Setup
id: setup
run: |
echo "title=hound: update repos $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Update hound repos
env:
# avoid the repo update script being rate limited
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
nix develop --option accept-flake-config true -c inv update-hound-repos
git commit -m "${{ steps.setup.outputs.title }}" services/hound/hound.json
- uses: peter-evans/create-pull-request@v5
with:
body: |
Automated update of hound repos
branch: update-hound
delete-branch: false
title: ${{ steps.setup.outputs.title }}
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -16,7 +16,6 @@
../roles/zfs-raid.nix
../roles/remote-builder/aarch64-build04.nix
../services/hound
../services/hydra
../services/nur-update
];

View file

@ -1,3 +0,0 @@
[https://search.nix-community.org](https://search.nix-community.org)
Hound code search for NixOS and nix-community GitHub organisations.

View file

@ -8,7 +8,6 @@ nav:
- R. RyanTM update bot: update-bot.md
- NUR update: nur-update.md
- nix-community.org DNS: dns.md
- code-search.md
- About:
- FAQ: faq.md
- administrators.md

View file

@ -1,25 +0,0 @@
From f976792420843bd079cea3aa85e70cc2cdbe98c2 Mon Sep 17 00:00:00 2001
From: Graham Christensen <graham@grahamc.com>
Date: Sun, 8 Oct 2017 10:59:05 -0400
Subject: [PATCH] Fail to start if any repos fail to index
---
cmds/houndd/main.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds/houndd/main.go b/cmds/houndd/main.go
index 60152ca..dfba0fc 100644
--- a/cmds/houndd/main.go
+++ b/cmds/houndd/main.go
@@ -132,7 +132,7 @@ func main() {
log.Panic(err)
}
if !ok {
- info_log.Println("Some repos failed to index, see output above")
+ info_log.Fatalf("Some repos failed to index, see output above")
} else {
info_log.Println("All indexes built!")
}
--
2.14.2

View file

@ -1,27 +0,0 @@
{ pkgs, ... }:
{
services.nginx.virtualHosts."search.nix-community.org" = {
enableACME = true;
forceSSL = true;
locations = {
"=/open_search.xml".alias = "${./open-search.xml}";
"/".proxyPass = "http://127.0.0.1:6080/";
};
};
services.hound = {
enable = true;
listen = "127.0.0.1:6080";
config = builtins.readFile ./hound.json;
package = pkgs.hound.overrideAttrs (_x: {
patches = [
./0001-Fail-to-start-if-any-repos-fail-to-index.patch
];
});
};
systemd.services.hound.serviceConfig = {
Restart = "always";
RestartSec = 5;
};
}

View file

@ -1,545 +0,0 @@
{
"dbpath": "/var/lib/hound/data",
"max-concurrent-indexers": 1,
"repos": {
"NixOS-.github": {
"url": "https://github.com/NixOS/.github.git"
},
"NixOS-20th-nix": {
"url": "https://github.com/NixOS/20th-nix.git"
},
"NixOS-bundlers": {
"url": "https://github.com/NixOS/bundlers.git"
},
"NixOS-cabal2nix": {
"url": "https://github.com/NixOS/cabal2nix.git"
},
"NixOS-calamares-nixos-extensions": {
"url": "https://github.com/NixOS/calamares-nixos-extensions.git"
},
"NixOS-darwin-stubs": {
"url": "https://github.com/NixOS/darwin-stubs.git"
},
"NixOS-distribution-nixpkgs": {
"url": "https://github.com/NixOS/distribution-nixpkgs.git"
},
"NixOS-equinix-metal-builders": {
"url": "https://github.com/NixOS/equinix-metal-builders.git"
},
"NixOS-flake-registry": {
"url": "https://github.com/NixOS/flake-registry.git"
},
"NixOS-foundation": {
"url": "https://github.com/NixOS/foundation.git"
},
"NixOS-hackage-db": {
"url": "https://github.com/NixOS/hackage-db.git"
},
"NixOS-hydra": {
"url": "https://github.com/NixOS/hydra.git"
},
"NixOS-hydra-ant-logger": {
"url": "https://github.com/NixOS/hydra-ant-logger.git"
},
"NixOS-hydra-provisioner": {
"url": "https://github.com/NixOS/hydra-provisioner.git"
},
"NixOS-jailbreak-cabal": {
"url": "https://github.com/NixOS/jailbreak-cabal.git"
},
"NixOS-language-nix": {
"url": "https://github.com/NixOS/language-nix.git"
},
"NixOS-mobile-nixos": {
"url": "https://github.com/NixOS/mobile-nixos.git"
},
"NixOS-mobile-nixos-website": {
"url": "https://github.com/NixOS/mobile-nixos-website.git"
},
"NixOS-moderation": {
"url": "https://github.com/NixOS/moderation.git"
},
"NixOS-mvn2nix-maven-plugin": {
"url": "https://github.com/NixOS/mvn2nix-maven-plugin.git"
},
"NixOS-nix": {
"url": "https://github.com/NixOS/nix.git"
},
"NixOS-nix-book": {
"url": "https://github.com/NixOS/nix-book.git"
},
"NixOS-nix-eclipse": {
"url": "https://github.com/NixOS/nix-eclipse.git"
},
"NixOS-nix-idea": {
"url": "https://github.com/NixOS/nix-idea.git"
},
"NixOS-nix-mode": {
"url": "https://github.com/NixOS/nix-mode.git"
},
"NixOS-nix-pills": {
"url": "https://github.com/NixOS/nix-pills.git"
},
"NixOS-nix.dev": {
"url": "https://github.com/NixOS/nix.dev.git"
},
"NixOS-nixops": {
"url": "https://github.com/NixOS/nixops.git"
},
"NixOS-nixops-aws": {
"url": "https://github.com/NixOS/nixops-aws.git"
},
"NixOS-nixops-hetzner": {
"url": "https://github.com/NixOS/nixops-hetzner.git"
},
"NixOS-nixos-artwork": {
"url": "https://github.com/NixOS/nixos-artwork.git"
},
"NixOS-nixos-channel-scripts": {
"url": "https://github.com/NixOS/nixos-channel-scripts.git"
},
"NixOS-nixos-common-styles": {
"url": "https://github.com/NixOS/nixos-common-styles.git"
},
"NixOS-nixos-hardware": {
"url": "https://github.com/NixOS/nixos-hardware.git"
},
"NixOS-nixos-homepage": {
"url": "https://github.com/NixOS/nixos-homepage.git"
},
"NixOS-nixos-metrics": {
"url": "https://github.com/NixOS/nixos-metrics.git"
},
"NixOS-nixos-org-configurations": {
"url": "https://github.com/NixOS/nixos-org-configurations.git"
},
"NixOS-nixos-planet": {
"url": "https://github.com/NixOS/nixos-planet.git"
},
"NixOS-nixos-search": {
"url": "https://github.com/NixOS/nixos-search.git"
},
"NixOS-nixos-status": {
"url": "https://github.com/NixOS/nixos-status.git"
},
"NixOS-nixos-summer": {
"url": "https://github.com/NixOS/nixos-summer.git"
},
"NixOS-nixos-weekly": {
"url": "https://github.com/NixOS/nixos-weekly.git"
},
"NixOS-nixpart": {
"url": "https://github.com/NixOS/nixpart.git"
},
"NixOS-nixpkgs": {
"url": "https://github.com/NixOS/nixpkgs.git"
},
"NixOS-npm2nix": {
"url": "https://github.com/NixOS/npm2nix.git"
},
"NixOS-ofborg": {
"url": "https://github.com/NixOS/ofborg.git"
},
"NixOS-package-list": {
"url": "https://github.com/NixOS/package-list.git"
},
"NixOS-patchelf": {
"url": "https://github.com/NixOS/patchelf.git"
},
"NixOS-release-wiki": {
"url": "https://github.com/NixOS/release-wiki.git"
},
"NixOS-reproducible.nixos.org": {
"url": "https://github.com/NixOS/reproducible.nixos.org.git"
},
"NixOS-rfc-steering-committee": {
"url": "https://github.com/NixOS/rfc-steering-committee.git"
},
"NixOS-rfc39": {
"url": "https://github.com/NixOS/rfc39.git"
},
"NixOS-rfc39-record": {
"url": "https://github.com/NixOS/rfc39-record.git"
},
"NixOS-rfcs": {
"url": "https://github.com/NixOS/rfcs.git"
},
"NixOS-security": {
"url": "https://github.com/NixOS/security.git"
},
"NixOS-snapd-nix-base": {
"url": "https://github.com/NixOS/snapd-nix-base.git"
},
"NixOS-templates": {
"url": "https://github.com/NixOS/templates.git"
},
"NixOS-whats-new-in-nix": {
"url": "https://github.com/NixOS/whats-new-in-nix.git"
},
"nix-community-.github": {
"url": "https://github.com/nix-community/.github.git"
},
"nix-community-NUR": {
"url": "https://github.com/nix-community/NUR.git"
},
"nix-community-NixNG": {
"url": "https://github.com/nix-community/NixNG.git"
},
"nix-community-NixOS-WSL": {
"url": "https://github.com/nix-community/NixOS-WSL.git"
},
"nix-community-aarch64-build-box": {
"url": "https://github.com/nix-community/aarch64-build-box.git"
},
"nix-community-acpi_call": {
"url": "https://github.com/nix-community/acpi_call.git"
},
"nix-community-all-cabal-json": {
"url": "https://github.com/nix-community/all-cabal-json.git"
},
"nix-community-awesome-nix": {
"url": "https://github.com/nix-community/awesome-nix.git"
},
"nix-community-builtwithnix.org": {
"url": "https://github.com/nix-community/builtwithnix.org.git"
},
"nix-community-bundix": {
"url": "https://github.com/nix-community/bundix.git"
},
"nix-community-comma": {
"url": "https://github.com/nix-community/comma.git"
},
"nix-community-crystal2nix": {
"url": "https://github.com/nix-community/crystal2nix.git"
},
"nix-community-developer-workshop": {
"url": "https://github.com/nix-community/developer-workshop.git"
},
"nix-community-disko": {
"url": "https://github.com/nix-community/disko.git"
},
"nix-community-docker-nixpkgs": {
"url": "https://github.com/nix-community/docker-nixpkgs.git"
},
"nix-community-dream2nix": {
"url": "https://github.com/nix-community/dream2nix.git"
},
"nix-community-dreampkgs": {
"url": "https://github.com/nix-community/dreampkgs.git"
},
"nix-community-eask2nix": {
"url": "https://github.com/nix-community/eask2nix.git"
},
"nix-community-emacs-overlay": {
"url": "https://github.com/nix-community/emacs-overlay.git"
},
"nix-community-emacs2nix": {
"url": "https://github.com/nix-community/emacs2nix.git"
},
"nix-community-ethereum.nix": {
"url": "https://github.com/nix-community/ethereum.nix.git"
},
"nix-community-fenix": {
"url": "https://github.com/nix-community/fenix.git"
},
"nix-community-flake-compat": {
"url": "https://github.com/nix-community/flake-compat.git"
},
"nix-community-flake-gemini": {
"url": "https://github.com/nix-community/flake-gemini.git"
},
"nix-community-flake-nimble": {
"url": "https://github.com/nix-community/flake-nimble.git"
},
"nix-community-gnome-session-ctl": {
"url": "https://github.com/nix-community/gnome-session-ctl.git"
},
"nix-community-go-nix": {
"url": "https://github.com/nix-community/go-nix.git"
},
"nix-community-gomod2nix": {
"url": "https://github.com/nix-community/gomod2nix.git"
},
"nix-community-google-summer-of-code": {
"url": "https://github.com/nix-community/google-summer-of-code.git"
},
"nix-community-hardware-mnt-reform": {
"url": "https://github.com/nix-community/hardware-mnt-reform.git"
},
"nix-community-harmonia": {
"url": "https://github.com/nix-community/harmonia.git"
},
"nix-community-haumea": {
"url": "https://github.com/nix-community/haumea.git"
},
"nix-community-home-manager": {
"url": "https://github.com/nix-community/home-manager.git"
},
"nix-community-hpe-ltfs": {
"url": "https://github.com/nix-community/hpe-ltfs.git"
},
"nix-community-hydra-check": {
"url": "https://github.com/nix-community/hydra-check.git"
},
"nix-community-impermanence": {
"url": "https://github.com/nix-community/impermanence.git"
},
"nix-community-infra": {
"url": "https://github.com/nix-community/infra.git"
},
"nix-community-label-approved": {
"url": "https://github.com/nix-community/label-approved.git"
},
"nix-community-lanzaboote": {
"url": "https://github.com/nix-community/lanzaboote.git"
},
"nix-community-lib-aggregate": {
"url": "https://github.com/nix-community/lib-aggregate.git"
},
"nix-community-lorri": {
"url": "https://github.com/nix-community/lorri.git"
},
"nix-community-luarocks-nix": {
"url": "https://github.com/nix-community/luarocks-nix.git"
},
"nix-community-mavenix": {
"url": "https://github.com/nix-community/mavenix.git"
},
"nix-community-mediawiki-matrix-bot": {
"url": "https://github.com/nix-community/mediawiki-matrix-bot.git"
},
"nix-community-meetup-london": {
"url": "https://github.com/nix-community/meetup-london.git"
},
"nix-community-mineflake": {
"url": "https://github.com/nix-community/mineflake.git"
},
"nix-community-naersk": {
"url": "https://github.com/nix-community/naersk.git"
},
"nix-community-namaka": {
"url": "https://github.com/nix-community/namaka.git"
},
"nix-community-napalm": {
"url": "https://github.com/nix-community/napalm.git"
},
"nix-community-neovim-nightly-overlay": {
"url": "https://github.com/nix-community/neovim-nightly-overlay.git"
},
"nix-community-nix-data-science": {
"url": "https://github.com/nix-community/nix-data-science.git"
},
"nix-community-nix-direnv": {
"url": "https://github.com/nix-community/nix-direnv.git"
},
"nix-community-nix-doom-emacs": {
"url": "https://github.com/nix-community/nix-doom-emacs.git"
},
"nix-community-nix-environments": {
"url": "https://github.com/nix-community/nix-environments.git"
},
"nix-community-nix-eval-jobs": {
"url": "https://github.com/nix-community/nix-eval-jobs.git"
},
"nix-community-nix-init": {
"url": "https://github.com/nix-community/nix-init.git"
},
"nix-community-nix-installers": {
"url": "https://github.com/nix-community/nix-installers.git"
},
"nix-community-nix-melt": {
"url": "https://github.com/nix-community/nix-melt.git"
},
"nix-community-nix-review-tools": {
"url": "https://github.com/nix-community/nix-review-tools.git"
},
"nix-community-nix-straight.el": {
"url": "https://github.com/nix-community/nix-straight.el.git"
},
"nix-community-nix-travis-ci": {
"url": "https://github.com/nix-community/nix-travis-ci.git"
},
"nix-community-nix-unstable-installer": {
"url": "https://github.com/nix-community/nix-unstable-installer.git"
},
"nix-community-nix-user-chroot": {
"url": "https://github.com/nix-community/nix-user-chroot.git"
},
"nix-community-nix-vscode-extensions": {
"url": "https://github.com/nix-community/nix-vscode-extensions.git"
},
"nix-community-nix-zsh-completions": {
"url": "https://github.com/nix-community/nix-zsh-completions.git"
},
"nix-community-nixago": {
"url": "https://github.com/nix-community/nixago.git"
},
"nix-community-nixago-extensions": {
"url": "https://github.com/nix-community/nixago-extensions.git"
},
"nix-community-nixbox": {
"url": "https://github.com/nix-community/nixbox.git"
},
"nix-community-nixdoc": {
"url": "https://github.com/nix-community/nixdoc.git"
},
"nix-community-nixops-datadog": {
"url": "https://github.com/nix-community/nixops-datadog.git"
},
"nix-community-nixops-digitalocean": {
"url": "https://github.com/nix-community/nixops-digitalocean.git"
},
"nix-community-nixops-encrypted-links": {
"url": "https://github.com/nix-community/nixops-encrypted-links.git"
},
"nix-community-nixops-gce": {
"url": "https://github.com/nix-community/nixops-gce.git"
},
"nix-community-nixops-libvirtd": {
"url": "https://github.com/nix-community/nixops-libvirtd.git"
},
"nix-community-nixops-vbox": {
"url": "https://github.com/nix-community/nixops-vbox.git"
},
"nix-community-nixos-gen-config": {
"url": "https://github.com/nix-community/nixos-gen-config.git"
},
"nix-community-nixos-generators": {
"url": "https://github.com/nix-community/nixos-generators.git"
},
"nix-community-nixos-images": {
"url": "https://github.com/nix-community/nixos-images.git"
},
"nix-community-nixos-install-scripts": {
"url": "https://github.com/nix-community/nixos-install-scripts.git"
},
"nix-community-nixos-modules-contrib": {
"url": "https://github.com/nix-community/nixos-modules-contrib.git"
},
"nix-community-nixos-vscode-server": {
"url": "https://github.com/nix-community/nixos-vscode-server.git"
},
"nix-community-nixpkgs-fmt": {
"url": "https://github.com/nix-community/nixpkgs-fmt.git"
},
"nix-community-nixpkgs-lint": {
"url": "https://github.com/nix-community/nixpkgs-lint.git"
},
"nix-community-nixpkgs-pytools": {
"url": "https://github.com/nix-community/nixpkgs-pytools.git"
},
"nix-community-nixpkgs-swh": {
"url": "https://github.com/nix-community/nixpkgs-swh.git"
},
"nix-community-nixpkgs-terraform-providers-bin": {
"url": "https://github.com/nix-community/nixpkgs-terraform-providers-bin.git"
},
"nix-community-nixpkgs-wayland": {
"url": "https://github.com/nix-community/nixpkgs-wayland.git"
},
"nix-community-nixpkgs.lib": {
"url": "https://github.com/nix-community/nixpkgs.lib.git"
},
"nix-community-nixt": {
"url": "https://github.com/nix-community/nixt.git"
},
"nix-community-noogle": {
"url": "https://github.com/nix-community/noogle.git"
},
"nix-community-npmlock2nix": {
"url": "https://github.com/nix-community/npmlock2nix.git"
},
"nix-community-nur-combined": {
"url": "https://github.com/nix-community/nur-combined.git"
},
"nix-community-nur-packages-template": {
"url": "https://github.com/nix-community/nur-packages-template.git"
},
"nix-community-nur-search": {
"url": "https://github.com/nix-community/nur-search.git"
},
"nix-community-nur-update": {
"url": "https://github.com/nix-community/nur-update.git"
},
"nix-community-nurl": {
"url": "https://github.com/nix-community/nurl.git"
},
"nix-community-patsh": {
"url": "https://github.com/nix-community/patsh.git"
},
"nix-community-pip2nix": {
"url": "https://github.com/nix-community/pip2nix.git"
},
"nix-community-pnpm2nix": {
"url": "https://github.com/nix-community/pnpm2nix.git"
},
"nix-community-poetry2nix": {
"url": "https://github.com/nix-community/poetry2nix.git"
},
"nix-community-pruned-racket-catalog": {
"url": "https://github.com/nix-community/pruned-racket-catalog.git"
},
"nix-community-pynixutil": {
"url": "https://github.com/nix-community/pynixutil.git"
},
"nix-community-pypi2nix-overrides": {
"url": "https://github.com/nix-community/pypi2nix-overrides.git"
},
"nix-community-queued-build-hook": {
"url": "https://github.com/nix-community/queued-build-hook.git"
},
"nix-community-redoxpkgs": {
"url": "https://github.com/nix-community/redoxpkgs.git"
},
"nix-community-review-bot": {
"url": "https://github.com/nix-community/review-bot.git"
},
"nix-community-rfc55": {
"url": "https://github.com/nix-community/rfc55.git"
},
"nix-community-rnix-lsp": {
"url": "https://github.com/nix-community/rnix-lsp.git"
},
"nix-community-rnix-parser": {
"url": "https://github.com/nix-community/rnix-parser.git"
},
"nix-community-talon-nix": {
"url": "https://github.com/nix-community/talon-nix.git"
},
"nix-community-templates": {
"url": "https://github.com/nix-community/templates.git"
},
"nix-community-terraform-nixos": {
"url": "https://github.com/nix-community/terraform-nixos.git"
},
"nix-community-todomvc-nix": {
"url": "https://github.com/nix-community/todomvc-nix.git"
},
"nix-community-travis-build": {
"url": "https://github.com/nix-community/travis-build.git"
},
"nix-community-tree-sitter-nix": {
"url": "https://github.com/nix-community/tree-sitter-nix.git"
},
"nix-community-trustix": {
"url": "https://github.com/nix-community/trustix.git"
},
"nix-community-vagrant-nixos-plugin": {
"url": "https://github.com/nix-community/vagrant-nixos-plugin.git"
},
"nix-community-vs-overlay": {
"url": "https://github.com/nix-community/vs-overlay.git"
},
"nix-community-vscode-nix-ide": {
"url": "https://github.com/nix-community/vscode-nix-ide.git"
},
"nix-community-wiki": {
"url": "https://github.com/nix-community/wiki.git"
}
},
"vcs-config": {
"git": {
"detect-ref": true
}
}
}

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Hound</ShortName>
<Description>Search code with Hound</Description>
<Tags>Hound</Tags>
<Url type="text/html"
method="get"
template="https://search.nix-community.org/?q={searchTerms}" />
</OpenSearchDescription>

View file

@ -6,7 +6,6 @@
jq
python3.pkgs.deploykit
python3.pkgs.invoke
python3.pkgs.requests
rsync
sops
ssh-to-age

View file

@ -49,75 +49,6 @@ def deploy_nixos(hosts: List[DeployHost]) -> None:
g.run_function(deploy)
@task
def update_hound_repos(c):
"""
Update list of repos for hound search
"""
def all_for_org(org):
import requests
github_token = os.environ.get("GITHUB_TOKEN")
disallowed_repos = [
"nix-community/dream2nix-auto-test",
"nix-community/image-spec",
"nix-community/nix",
"nix-community/nixpkgs",
"nix-community/nsncd",
"nix-community/rkwifibt",
]
resp = {}
next_url = "https://api.github.com/orgs/{}/repos".format(org)
while next_url is not None:
if github_token is not None:
headers = {"Authorization": f"token {github_token}"}
repo_resp = requests.get(next_url, headers=headers)
else:
repo_resp = requests.get(next_url)
if "next" in repo_resp.links:
next_url = repo_resp.links["next"]["url"]
else:
next_url = None
repos = repo_resp.json()
resp.update(
{
"{}-{}".format(org, repo["name"]): {
"url": repo["clone_url"],
}
for repo in repos
if repo["size"] != 0 # skip empty repos
if repo["full_name"] not in disallowed_repos
if repo["archived"] is False
}
)
return resp
repos = {**all_for_org("NixOS"), **all_for_org("nix-community")}
with open("services/hound/hound.json", "w") as f:
f.write(
json.dumps(
{
"max-concurrent-indexers": 1,
"dbpath": "/var/lib/hound/data",
"repos": repos,
"vcs-config": {"git": {"detect-ref": True}},
},
indent=2,
sort_keys=True,
)
)
f.write("\n")
@task
def update_sops_files(c):
"""