init nixos search api

Former-commit-id: 0770bedfdb
This commit is contained in:
Hadi
2025-04-03 17:39:42 +02:00
parent b8ceb39db9
commit 13578f0f2f
2 changed files with 20 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
url = "github:KZDKM/Hyprspace"; url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";
}; };
nixos-search-api.url = "github:anotherhadi/nixos-search-api";
}; };
outputs = inputs@{ nixpkgs, ... }: { outputs = inputs@{ nixpkgs, ... }: {

View File

@@ -0,0 +1,19 @@
{ inputs, config, ... }:
let domain = "nixos-search-api.hadi.diy";
in {
imports = [ inputs.nixos-search-api.nixosModules.nixos-search-api ];
services.nixos-search-api = {
enable = true;
port = 8089;
};
nginx.virtualHosts."${domain}" = {
useACMEHost = "hadi.diy";
forceSSL = true;
locations."/" = {
proxyPass =
"http://127.0.0.1:${toString config.services.nixos-search-api.port}";
};
};
}