mkModule gitea

This commit is contained in:
mjallen18
2025-12-15 20:07:48 -06:00
parent e74ea5f13b
commit 50345adeb5
9 changed files with 73 additions and 338 deletions

View File

@@ -113,10 +113,10 @@ let
listen_uri = "${cfg.listenAddress}:${toString cfg.port}";
};
client = {
credentials_path = lib.mkForce "/media/nas/main/nix-app-data/crowdsec/client.yaml";
credentials_path = lib.mkForce "${cfg.configDir}/crowdsec/client.yaml";
};
};
capi.credentialsFile = lib.mkDefault "/media/nas/main/nix-app-data/crowdsec/capi.yaml";
capi.credentialsFile = lib.mkDefault "${cfg.configDir}/crowdsec/capi.yaml";
};
};
};

View File

@@ -1,37 +0,0 @@
{ lib, namespace, ... }:
with lib;
{
options.${namespace}.services.crowdsec = {
enable = mkEnableOption "crowdsec service";
port = mkOption {
type = types.port;
default = 8080;
description = "Port for crowdsec API";
};
openFirewall = mkOption {
type = types.bool;
default = true;
description = "Whether to open firewall for crowdsec";
};
apiAddress = mkOption {
type = types.str;
default = "127.0.0.1";
description = "API address for crowdsec";
};
apiKey = mkOption {
type = types.str;
default = "";
description = "API key for crowdsec bouncer";
};
dataDir = mkOption {
type = types.str;
default = "";
description = "Data directory for crowdsec";
};
};
}