mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
init nixos search api
This commit is contained in:
19
server-modules/nixos-search-api.nix
Normal file
19
server-modules/nixos-search-api.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user