feat: Add crowdsec module
This commit is contained in:
parent
22981fdcdd
commit
d0c6f2bcbe
13 changed files with 624 additions and 6 deletions
29
flake.nix
29
flake.nix
|
@ -26,6 +26,8 @@
|
|||
url = "git+ssh://git@github.com/sonnenshift/battery-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixpkgs-crowdsec.url = "github:tlater/nixpkgs/tlater/fix-crowdsec";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -98,7 +100,16 @@
|
|||
# Garbage collection root #
|
||||
###########################
|
||||
|
||||
packages.${system}.default = vm.config.system.build.vm;
|
||||
packages.${system} =
|
||||
let
|
||||
localPkgs = import ./pkgs { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
default = vm.config.system.build.vm;
|
||||
crowdsec = pkgs.callPackage "${inputs.nixpkgs-crowdsec}/pkgs/by-name/cr/crowdsec/package.nix" { };
|
||||
crowdsec-hub = localPkgs.crowdsec.hub;
|
||||
crowdsec-firewall-bouncer = localPkgs.crowdsec.firewall-bouncer;
|
||||
};
|
||||
|
||||
###################
|
||||
# Utility scripts #
|
||||
|
@ -115,6 +126,22 @@
|
|||
${vm.config.system.build.vm.outPath}/bin/run-testvm-vm
|
||||
'').outPath;
|
||||
};
|
||||
|
||||
update-crowdsec-packages =
|
||||
let
|
||||
git = pkgs.lib.getExe pkgs.git;
|
||||
nvfetcher = pkgs.lib.getExe pkgs.nvfetcher;
|
||||
in
|
||||
{
|
||||
type = "app";
|
||||
program =
|
||||
(pkgs.writeShellScript "update-crowdsec-packages" ''
|
||||
cd "$(${git} rev-parse --show-toplevel)"
|
||||
cd ./pkgs/crowdsec
|
||||
${nvfetcher}
|
||||
echo 'Remember to update the vendorHash of any go packages!'
|
||||
'').outPath;
|
||||
};
|
||||
};
|
||||
|
||||
###########################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue