37 lines
688 B
Nix
37 lines
688 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.settings.containers.caddy;
|
|
in {
|
|
options = {
|
|
settings.containers.caddy.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enable caddy container
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.podman.containers.caddy = {
|
|
image = "ghcr.io/iarekylew00t/caddy-cloudflare:latest";
|
|
ports = [
|
|
"1080:80"
|
|
"1443:8443"
|
|
];
|
|
volumes = [
|
|
"~/containers/caddy/Caddyfile:/etc/caddy/Caddyfile"
|
|
];
|
|
};
|
|
|
|
home.file."containers/caddy/Caddyfile".text = ''
|
|
localhost
|
|
|
|
response "Hello, world!"
|
|
'';
|
|
};
|
|
}
|