nix-config/modules/containers/default.nix
2026-02-19 00:58:56 +01:00

38 lines
745 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types;
cfg = config.horseman.containers;
in {
imports = [
./nginx.nix
./forgejo.nix
./vaultwarden.nix
./jellyfin.nix
];
options = {
horseman.containers = {
enable = mkEnableOption "Containers";
interface = mkOption {
type = types.str;
};
backupDir = mkOption {
type = types.str;
};
};
};
config = mkIf cfg.enable {
networking.nat = {
enable = true;
# Use "ve-*" when using nftables instead of iptables
internalInterfaces = ["ve-+"];
externalInterface = cfg.interface;
# Lazy IPv6 connectivity for the container
enableIPv6 = true;
};
};
}