From 0398d077e5d7066d7185af5e4488f51639d0f1e2 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sat, 5 Apr 2025 14:04:06 +0200 Subject: [PATCH] fix search-nix-api --- flake.lock | 186 ++++++++++-------- flake.nix | 4 +- hosts/server/configuration.nix | 2 +- ...os-search-api.nix => search-nixos-api.nix} | 7 +- 4 files changed, 109 insertions(+), 90 deletions(-) rename server-modules/{nixos-search-api.nix => search-nixos-api.nix} (61%) diff --git a/flake.lock b/flake.lock index 1c84f71..c49855b 100644 --- a/flake.lock +++ b/flake.lock @@ -89,11 +89,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1743265529, + "narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "1d2dbd72c2bbaceab031c592d4810f744741d203", "type": "github" }, "original": { @@ -465,11 +465,11 @@ ] }, "locked": { - "lastModified": 1743438213, - "narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=", + "lastModified": 1743788974, + "narHash": "sha256-2LeVyQZI2wTkSzMLvnN/kJjXVWp4HCVUoq17Bv8TNTk=", "owner": "nix-community", "repo": "home-manager", - "rev": "ccd7df836e1f42ea84806760f25b77b586370259", + "rev": "0f5908daf890c3d7e7052bef1d6deb0f2710aaa1", "type": "github" }, "original": { @@ -499,6 +499,27 @@ "type": "github" } }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743604125, + "narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -573,11 +594,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1743437607, - "narHash": "sha256-n/ph/EIdKLYS8CMnlOtYtq1Po1iRy8E3TmX9hBsD7Dg=", + "lastModified": 1743809433, + "narHash": "sha256-lgcIktSb65t9SjXOc7Jv4MWbuvPm+F1lWq8gGkwElfQ=", "ref": "refs/heads/main", - "rev": "4c987b20e28362410d0c9f9a37bafd6f128b0a2c", - "revCount": 5954, + "rev": "8ba20fcae124591718bddadd94c5e8c381d02097", + "revCount": 5964, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -600,11 +621,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743549251, + "narHash": "sha256-yf+AXt0RkAkCyF6iSnJt6EJAnNG/l6qv70CVzhRP6Bg=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "4ab17ccac08456cb5e00e8bd323de2efd30612be", "type": "github" }, "original": { @@ -716,11 +737,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1743311006, - "narHash": "sha256-LfKnTg1Ic17d5yPIqmMQyyHTKjMC4a82/zLdKmooayE=", + "lastModified": 1743833598, + "narHash": "sha256-ndewAvhdD8yKPHyHwP8gi9hJp+uTKK78/D7+ajLMkD0=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "3bcd3c4710fc025bbe403948f10c3922a8bf5193", + "rev": "18c383b7546a3f8105b2b32d488ff212a582c481", "type": "github" }, "original": { @@ -762,11 +783,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1742984269, + "narHash": "sha256-uz9FaCIbga/gQ5ZG1Hb4HVVjTWT1qjjCAFlCXiaefxg=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "7248194a2ce0106ae647b70d0526a96dc9d6ad60", "type": "github" }, "original": { @@ -835,11 +856,11 @@ "website-builder": "website-builder" }, "locked": { - "lastModified": 1742243092, - "narHash": "sha256-pTMB/aLTufgNX3rJlT5Ia64TofZxOdEGMl9nfc3D++o=", + "lastModified": 1743834822, + "narHash": "sha256-VZZrnfnhhrS1f02Ewyx8OBotsGzRouJRn6Q4JK0HVjk=", "owner": "rasmus-kirk", "repo": "nixarr", - "rev": "046ec8d875611ec2c93d5c45eebf6b46f0f350e8", + "rev": "2038a5985b230668a491d25bf5298fd48781676a", "type": "github" }, "original": { @@ -856,11 +877,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1743170370, - "narHash": "sha256-v8ZdXs0fj0LG2jH0NJvfeMt0b+qJYxbN+fnto4kqdyM=", + "lastModified": 1743833482, + "narHash": "sha256-tUV7MhS/JFOEp3JQxiyvo8K3aS5zP5jcF/Buk57yWDo=", "owner": "kaylorben", "repo": "nixcord", - "rev": "b969aa7b1e1925935eda22da01ffbf028c7c2a51", + "rev": "2903d897d5939324a758bd3f2cee1fbcb118b5d1", "type": "github" }, "original": { @@ -885,24 +906,6 @@ "type": "github" } }, - "nixos-search-api": { - "inputs": { - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1743755053, - "narHash": "sha256-OD7od7FZqRGaqdZqcds+gvOKMQ5wljXEeh00siFe/yc=", - "owner": "anotherhadi", - "repo": "nixos-search-api", - "rev": "d00e07aece54461d0b49164f8dbaaa917ac44877", - "type": "github" - }, - "original": { - "owner": "anotherhadi", - "repo": "nixos-search-api", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1730200266, @@ -937,11 +940,11 @@ }, "nixpkgs_11": { "locked": { - "lastModified": 1742288794, - "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", + "lastModified": 1743448293, + "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", + "rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3", "type": "github" }, "original": { @@ -969,11 +972,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { @@ -1032,6 +1035,22 @@ } }, "nixpkgs_7": { + "locked": { + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { "locked": { "lastModified": 1743583204, "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", @@ -1047,29 +1066,13 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1743315132, - "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "52faf482a3889b7619003c0daec593a1912fddc1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_9": { "locked": { - "lastModified": 1743076231, - "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", + "lastModified": 1743441817, + "narHash": "sha256-+OE03P3u0FRwhS+Ah6EYiwxdS1rcIYlXheuXGM3wP3Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c5963357f3c1c840201eda129a99d455074db04", + "rev": "3eeaa42ef4c19447b48d1c676fe59077dfd0846e", "type": "github" }, "original": { @@ -1194,15 +1197,33 @@ "nixarr": "nixarr", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", - "nixos-search-api": "nixos-search-api", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "nixvim": "nixvim", + "search-nixos-api": "search-nixos-api", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", "stylix": "stylix", "zen-browser": "zen-browser" } }, + "search-nixos-api": { + "inputs": { + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1743850899, + "narHash": "sha256-k9Cx29WgCPOzL9oMdo9SDZdFBdXyJGS3mnIIW6H2uh8=", + "owner": "anotherhadi", + "repo": "search-nixos-api", + "rev": "9d33ecb389ca861b807a88b44100340cde7a9501", + "type": "github" + }, + "original": { + "owner": "anotherhadi", + "repo": "search-nixos-api", + "type": "github" + } + }, "sf-arabic": { "flake": false, "locked": { @@ -1292,11 +1313,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1743305778, - "narHash": "sha256-Ux/UohNtnM5mn9SFjaHp6IZe2aAnUCzklMluNtV6zFo=", + "lastModified": 1743756170, + "narHash": "sha256-2b11EYa08oqDmF3zEBLkG1AoNn9rB1k39ew/T/mSvbU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8e873886bbfc32163fe027b8676c75637b7da114", + "rev": "cff8437c5fe8c68fc3a840a21bf1f4dc801da40d", "type": "github" }, "original": { @@ -1313,11 +1334,11 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1743308176, - "narHash": "sha256-xiHVIJsxj3tknObHzfKsWHQ0N38zyFsb8edB3oXDOxg=", + "lastModified": 1743595372, + "narHash": "sha256-e3x1mhpPpYgyyin9j/VbrBpOT5PFpEfx2hkxVZuJZhg=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "567e5b6ee6d7433261f16b400e424a6bd5c8c8b3", + "rev": "543f12dd14c62ddee79ab79fbfd8726f312b89ff", "type": "github" }, "original": { @@ -1348,11 +1369,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1743434236, - "narHash": "sha256-KH9Qdnjj9FJuktRHhK5hsQdeSPYsZfGRB7t+Q34In34=", + "lastModified": 1743775855, + "narHash": "sha256-ZhhiYvHlA9f/Ck1i76ilfapLS7abLPRlWJQRxJEDTnQ=", "owner": "danth", "repo": "stylix", - "rev": "c546582bae1a2c8745295a167b8db779215d780b", + "rev": "581fa67c818aaf91a1533149fb737d3e8c0949b8", "type": "github" }, "original": { @@ -1669,14 +1690,15 @@ }, "zen-browser": { "inputs": { + "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1743216975, - "narHash": "sha256-29xgm8F3DCcTNrQZ9V3Pwj6BkjalkKvGyjd+sF9/+3k=", + "lastModified": 1743849740, + "narHash": "sha256-ggVct8jrTB8OZBtPxH++PZDBhOU1MJHdpzBDhs5PxtQ=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "165ee672e6b17a8bcc0a3fb51fab3f79715cc1f3", + "rev": "41455486298ef224e4bae6f551d3508b94d36456", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c01f732..c2a66bd 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,7 @@ url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; - nixos-search-api.url = "github:anotherhadi/nixos-search-api"; + search-nixos-api.url = "github:anotherhadi/search-nixos-api"; }; outputs = inputs@{ nixpkgs, ... }: { @@ -63,7 +63,7 @@ inputs.stylix.nixosModules.stylix inputs.sops-nix.nixosModules.sops inputs.nixarr.nixosModules.default - inputs.nixos-search-api.nixosModules.nixos-search-api + inputs.search-nixos-api.nixosModules.search-nixos-api ./hosts/server/configuration.nix ]; }; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 4faa52f..b63ea04 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -19,7 +19,7 @@ ../../server-modules/arr.nix ../../server-modules/mealie.nix ../../server-modules/meilisearch.nix - ../../server-modules/nixos-search-api.nix + ../../server-modules/search-nixos-api.nix # You should let those lines as is ./hardware-configuration.nix diff --git a/server-modules/nixos-search-api.nix b/server-modules/search-nixos-api.nix similarity index 61% rename from server-modules/nixos-search-api.nix rename to server-modules/search-nixos-api.nix index da9fd45..425cd32 100644 --- a/server-modules/nixos-search-api.nix +++ b/server-modules/search-nixos-api.nix @@ -2,17 +2,14 @@ let domain = "search-nixos-api.hadi.diy"; in { services = { - nixos-search-api = { - enable = true; - port = 8089; - }; + search-nixos-api = { enable = true; }; nginx.virtualHosts."${domain}" = { useACMEHost = "hadi.diy"; forceSSL = true; locations."/" = { proxyPass = - "http://127.0.0.1:${toString config.services.nixos-search-api.port}"; + "http://127.0.0.1:${toString config.services.search-nixos-api.port}/"; }; }; };