From d5aab3af33ff3ff69a9b804e322a03d5fbb682aa Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Wed, 17 Jun 2026 09:07:20 +0000 Subject: [PATCH] add zoekt-hel Signed-off-by: Seongmin Lee --- flake.lock | 20 ++++++++++---------- flake.nix | 10 +++++++++- hosts/zoekt-hel/configuration.nix | 6 ++++++ hosts/zoekt-hel/disk-config.nix | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ hosts/prometheus-hel/services/prometheus.nix | 4 ++++ hosts/zoekt-hel/services/zoekt.nix | 9 +++++++++ 6 file(s) changed, 92 insertion(s)(+), 11 deletion(s)(-) diff --git a/flake.lock b/flake.lock --- a/flake.lock +++ b/flake.lock @@ -558,16 +558,16 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1781216227, + "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-26.05", "repo": "nixpkgs", "type": "github" } @@ -752,16 +752,16 @@ "sqlite-lib-src": "sqlite-lib-src_2" }, "locked": { - "lastModified": 1781516293, - "narHash": "sha256-lmsArNExzU8g1HGQfIVYwyCfmr/tGjDgr+Mm1gxj+nA=", - "ref": "master", - "rev": "97e8ed99edbf32aff3e8bd5ba3021e72030953b5", - "revCount": 2667, + "lastModified": 1781691456, + "narHash": "sha256-nDMEoPtOFLtRqlCnaH1XbHLUJdERyhPLh07yIaiOdtA=", + "ref": "sl/codesearch", + "rev": "8d98535d71e09ddca0df4708770ed67a58466ffc", + "revCount": 2698, "type": "git", "url": "https://tangled.org/tangled.org/core" }, "original": { - "ref": "master", + "ref": "sl/codesearch", "type": "git", "url": "https://tangled.org/tangled.org/core" } diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; tangled.url = "git+https://knot1.tangled.sh/tangled.org/core?ref=op/ywtwzuylowtz"; - tangled-mirror.url = "git+https://tangled.org/tangled.org/core?ref=master"; + tangled-mirror.url = "git+https://tangled.org/tangled.org/core?ref=sl/codesearch"; colmena.url = "github:zhaofengli/colmena/release-0.4.x"; disko = { url = "github:nix-community/disko"; @@ -116,6 +116,14 @@ ./hosts/prometheus-hel/services/prometheus.nix ]; target = "62.238.19.177"; + }; + + zoekt-hel = { + modules = [ + tangled-mirror.nixosModules.zoekt-tnglserver + ./hosts/zoekt-hel/services/zoekt.nix + ]; + target = "65.108.221.61"; }; knot1 = { diff --git a/hosts/zoekt-hel/configuration.nix b/hosts/zoekt-hel/configuration.nix new file mode 100644 --- /dev/null +++ b/hosts/zoekt-hel/configuration.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [./disk-config.nix]; + networking.hostName = "zoekt-hel"; + users.users.tangler.extraGroups = []; + system.stateVersion = "25.05"; +} diff --git a/hosts/zoekt-hel/disk-config.nix b/hosts/zoekt-hel/disk-config.nix new file mode 100644 --- /dev/null +++ b/hosts/zoekt-hel/disk-config.nix @@ -0,0 +1,54 @@ +{lib, ...}: { + disko.devices = { + disk.disk1 = { + device = lib.mkDefault "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + name = "boot"; + size = "1M"; + type = "EF02"; + }; + esp = { + name = "ESP"; + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + name = "root"; + size = "100%"; + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%FREE"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + "defaults" + ]; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/prometheus-hel/services/prometheus.nix b/hosts/prometheus-hel/services/prometheus.nix --- a/hosts/prometheus-hel/services/prometheus.nix +++ b/hosts/prometheus-hel/services/prometheus.nix @@ -34,6 +34,10 @@ static_configs = [{ targets = [ "127.0.0.1:9100" ]; }]; } { + job_name = "zoekt-hel"; + static_configs = [{ targets = [ "zoekt-hel:9100" ]; }]; + } + { job_name = "knotmirror"; static_configs = [{ targets = [ "mirror:7100" ]; }]; } diff --git a/hosts/zoekt-hel/services/zoekt.nix b/hosts/zoekt-hel/services/zoekt.nix new file mode 100644 --- /dev/null +++ b/hosts/zoekt-hel/services/zoekt.nix @@ -0,0 +1,9 @@ +{ + services.tangled.zoekt = { + enable = true; + listenAddr = "127.0.0.1:6060"; + webListenAddr = "127.0.0.1:6070"; + indexConcurrency = 12; + indexQueueSize = 10000; + }; +} -- tangled.sh