Try to use age for crowdsec lapi config
This commit is contained in:
parent
64986d2883
commit
42792ec4d8
5 changed files with 85 additions and 85 deletions
95
flake.nix
95
flake.nix
|
@ -31,74 +31,34 @@
|
|||
nixosConfigurations = {
|
||||
nginx = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
{
|
||||
services.crowdsec-firewall-bouncer = {
|
||||
enable = true;
|
||||
package = inputs.crowdsec.packages."x86_64-linux".crowdsec-firewall-bouncer;
|
||||
};
|
||||
}
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
networking.hostName = "nginx";
|
||||
services = {
|
||||
vm_nginx = {
|
||||
enable = true;
|
||||
};
|
||||
crowdsec = {
|
||||
enable = true;
|
||||
package = pkgs.crowdsec;
|
||||
autoUpdateService = false;
|
||||
settings = {
|
||||
general = {
|
||||
api = {
|
||||
server = {
|
||||
enable = false;
|
||||
#listen_uri = "127.0.0.1:8080";
|
||||
};
|
||||
};
|
||||
prometheus.listen_addr = "0.0.0.0";
|
||||
};
|
||||
};
|
||||
hub.collections = [
|
||||
"firix/authentik"
|
||||
"crowdsecurity/sshd"
|
||||
"crowdsecurity/linux"
|
||||
"crowdsecurity/nginx"
|
||||
"LePresidente/grafana"
|
||||
"LePresidente/jellyfin"
|
||||
"crowdsecurity/http-cve"
|
||||
"crowdsecurity/nextcloud"
|
||||
"crowdsecurity/base-http-scenarios"
|
||||
];
|
||||
localConfig = {
|
||||
acquisitions = [
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
|
||||
labels = {
|
||||
type = "syslog";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.hostName = "nginx";
|
||||
}
|
||||
];
|
||||
};
|
||||
pgsql = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
networking.hostName = "pgsql";
|
||||
services.vm_postgresql = {
|
||||
|
@ -107,44 +67,16 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
onlyoffice = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
{
|
||||
networking.hostName = "onlyoffice";
|
||||
services.vm_onlyoffice = {
|
||||
enable = true;
|
||||
pgsql_ip = pgsql_host;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
collabora = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
{
|
||||
networking.hostName = "collabora";
|
||||
services.vm_collabora = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
forgejo = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
networking.hostName = "forgejo";
|
||||
services.vm_forgejo = {
|
||||
|
@ -156,8 +88,10 @@
|
|||
};
|
||||
template = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-image.nix"
|
||||
"${inputs.self}/systems/minimalVMConfig.nix"
|
||||
{
|
||||
|
@ -167,11 +101,14 @@
|
|||
};
|
||||
jellyfin = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-image.nix"
|
||||
"${inputs.self}/systems/minimalVMConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
services.vm_jellyfin = {
|
||||
enable = true;
|
||||
|
@ -181,11 +118,14 @@
|
|||
};
|
||||
redis = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
networking.hostName = "redis";
|
||||
services.vm_redis = {
|
||||
|
@ -196,11 +136,14 @@
|
|||
};
|
||||
grafana-lxc = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
crowdsec.nixosModules.crowdsec-firewall-bouncer
|
||||
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
||||
"${inputs.self}/systems/minimalLXCConfig.nix"
|
||||
"${inputs.self}/services"
|
||||
"${inputs.self}/modules"
|
||||
{
|
||||
services.vm_grafana = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue