Use Crowdsec rewrite
This commit is contained in:
parent
76f19a2ac9
commit
796a42e70e
2 changed files with 51 additions and 36 deletions
|
|
@ -23,6 +23,8 @@
|
|||
url = "https://keys.openpgp.org/vks/v1/by-email/wekuz%40duck.com";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
crowdsec-rewrite.url = "github:TornaxO7/nixpkgs/saltsprint";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -37,6 +39,7 @@
|
|||
nixosConfigurations = {
|
||||
plexy = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/plexy
|
||||
home-manager.nixosModules.home-manager
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
disabledModules = [
|
||||
"services/security/crowdsec.nix"
|
||||
"services/security/crowdsec-firewall-bouncer.nix"
|
||||
];
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disko-config.nix
|
||||
"${inputs.crowdsec-rewrite}/nixos/modules/services/security/crowdsec.nix"
|
||||
"${inputs.crowdsec-rewrite}/nixos/modules/services/security/crowdsec-firewall-bouncer.nix"
|
||||
];
|
||||
|
||||
nix = {
|
||||
|
|
@ -149,29 +157,16 @@
|
|||
autoUpdateService = true;
|
||||
|
||||
settings = {
|
||||
lapi.credentialsFile = "/var/lib/crowdsec/local_api_credentials.yaml";
|
||||
console.tokenFile = config.sops.secrets."crowdsec-console-token".path;
|
||||
general = {
|
||||
console.enrollKeyFile = config.sops.secrets."crowdsec-console-token".path;
|
||||
config = {
|
||||
|
||||
api.server = {
|
||||
enable = true;
|
||||
};
|
||||
prometheus.enabled = false;
|
||||
online_client.credentials_path = "/var/lib/crowdsec/online_api_credentials.yaml";
|
||||
};
|
||||
};
|
||||
hub.collections = [
|
||||
"crowdsecurity/linux"
|
||||
"crowdsecurity/sshd"
|
||||
|
||||
"crowdsecurity/base-http-scenarios"
|
||||
"crowdsecurity/caddy"
|
||||
|
||||
"Dominic-Wagner/vaultwarden"
|
||||
"LePresidente/jellyfin"
|
||||
"LePresidente/jellyseerr"
|
||||
|
||||
"crowdsecurity/whitelist-good-actors"
|
||||
];
|
||||
localConfig.acquisitions = [
|
||||
acquisitions = [
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
|
||||
|
|
@ -204,8 +199,25 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
hub.collections = [
|
||||
"crowdsecurity/linux"
|
||||
"crowdsecurity/sshd"
|
||||
|
||||
"crowdsecurity/base-http-scenarios"
|
||||
"crowdsecurity/caddy"
|
||||
|
||||
"Dominic-Wagner/vaultwarden"
|
||||
"LePresidente/jellyfin"
|
||||
"LePresidente/jellyseerr"
|
||||
|
||||
"crowdsecurity/whitelist-good-actors"
|
||||
];
|
||||
};
|
||||
crowdsec-firewall-bouncer = {
|
||||
enable = true;
|
||||
registerBouncer.enable = false;
|
||||
secrets.apiKeyPath = "/var/lib/crowdsec/firewall-bouncer-key";
|
||||
};
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue