28 lines
618 B
Nix
28 lines
618 B
Nix
{ lib, config, ... }:
|
|
let
|
|
inherit (lib) mkIf mkOption types;
|
|
cfg = config.smayzy.containers.docker.cyberchef;
|
|
in
|
|
{
|
|
options.smayzy.containers.docker.cyberchef = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "cyberchef docker ct";
|
|
};
|
|
port = mkOption {
|
|
type = types.int;
|
|
default = 80;
|
|
description = "cyberchef's port";
|
|
};
|
|
};
|
|
config = mkIf cfg.enable {
|
|
virtualisation.oci-containers.containers = {
|
|
cyberchef = {
|
|
image = "ghcr.io/gchq/cyberchef";
|
|
ports = [ "${toString cfg.port}:80" ];
|
|
};
|
|
};
|
|
};
|
|
}
|