mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 07:29:23 +08:00
modules.services.peerBanHelper: init
This commit is contained in:
@@ -103,6 +103,7 @@ inputs:
|
||||
keyd = {};
|
||||
kvm.aarch64 = true;
|
||||
nfs."/" = [ "192.168.84.0/24" ];
|
||||
peerBanHelper = {};
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" "iwlwifi" ];
|
||||
packages = { mathematica = {}; vasp = {}; };
|
||||
|
||||
@@ -204,4 +204,16 @@
|
||||
name = "guix.iso";
|
||||
sha256 = "0xqabnay8wwqc1a96db8ix1a6bhvgm84s5is1q67rr432q7gqgd4";
|
||||
};
|
||||
peerBanHelper =
|
||||
{
|
||||
image = "ghostchu/peerbanhelper:v8.0.12";
|
||||
imageFile = pkgs.dockerTools.pullImage
|
||||
{
|
||||
imageName = "ghostchu/peerbanhelper";
|
||||
imageDigest = "sha256:fce7047795fe1e6d730ea2583b390ccc336e79eb2d8dae8114f4f63f00208879";
|
||||
hash = "sha256-7Z2ewDpGFXyvCze9HZ7KwFwn9o9R6Y4pjJDcr5Wmy1g=";
|
||||
finalImageName = "ghostchu/peerbanhelper";
|
||||
finalImageTag = "v8.0.12";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
16
modules/services/peerBanHelper.nix
Normal file
16
modules/services/peerBanHelper.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.peerBanHelper = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) peerBanHelper; in inputs.lib.mkIf (peerBanHelper != null)
|
||||
{
|
||||
virtualisation.oci-containers.containers.peerBanHelper =
|
||||
{
|
||||
inherit (inputs.topInputs.self.src.peerBanHelper) image imageFile;
|
||||
volumes = [ "peerBanHelper:/app/data" ];
|
||||
ports = [ "9898:9898/tcp" ];
|
||||
environment = { PUID = "0"; PGID = "0"; TZ = "UTC"; };
|
||||
};
|
||||
nixos.services.podman = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user