feat : bug

This commit is contained in:
Wateir 2025-12-23 17:53:37 +01:00
parent 23a6282e6d
commit 8586884e4a
7 changed files with 38 additions and 13 deletions

View file

@ -28,6 +28,7 @@ in {
./searXNG.nix
./roundcube.nix
./vaultWarden.nix
./forgejo.nix
];
options.module = {
@ -68,6 +69,14 @@ in {
};
};
forgejo = mkServiceOption {
desc = "Vaultwarden password manager";
extraOpts = {
externalPort = mkPortOption 3000;
internalPort = mkPortOption 8223;
};
};
searxng = mkServiceOption {
desc = "SearXNG meta-search engine";
extraOpts = { port = mkPortOption 1692; };

View file

@ -8,10 +8,10 @@ lib.mkIf config.module.forgejo.enable {
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.example.com";
DOMAIN = "git.${config.module.domain}";
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3000;
HTTP_PORT = 8222;
};
};
};

View file

@ -40,6 +40,15 @@ with lib;
};
};
})
(mkIf config.module.forgejo.enable {
"${config.module.hostName}-vault" = {
listen = [{ addr = "0.0.0.0"; port = config.module.forgejo.externalPort; }];
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.module.forgejo.internalPort}";
};
};
})
];
networking.firewall.allowedTCPPorts = concatLists [

View file

@ -1,6 +1,6 @@
{ config,lib,pkgs, ... }:
lib.mkIf config.module.roundcube.enable {
lib.mkIf config.module.searxng.enable {
services.searx = {
enable = true;
redisCreateLocally = true;