forked from kampka/nix-flake-crowdsec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
36 lines (32 loc) · 1.05 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
description = "CrowdSec is a free, open-source and collaborative IPS";
outputs = {
self,
nixpkgs,
flake-utils,
}: let
systems = flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
crowdsec = pkgs.callPackage ./packages/crowdsec {};
bouncer-firewall = pkgs.callPackage ./packages/bouncer-firewall {};
in {
formatter = pkgs.alejandra;
packages."crowdsec" = crowdsec;
packages."crowdsec-firewall-bouncer" = bouncer-firewall;
checks = {
minimal = import ./tests/minimal.nix {inherit pkgs self;};
pattern = import ./tests/patterns.nix {inherit pkgs self;};
};
});
in (systems
// {
nixosModules = {
crowdsec = ./modules/crowdsec;
crowdsec-firewall-bouncer = ./modules/crowdsec-firewall-bouncer;
};
overlays.default = final: prev: {
crowdsec = systems.packages.${final.system}.crowdsec;
crowdsec-firewall-bouncer = systems.packages.${final.system}.crowdsec-firewall-bouncer;
};
});
}