mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.network.firewall;
|
|
in
|
|
{
|
|
options.network.firewall = {
|
|
public.tcp.ports = mkOption {
|
|
type = types.listOf types.port;
|
|
default = [ ];
|
|
};
|
|
public.udp.ports = mkOption {
|
|
type = types.listOf types.port;
|
|
default = [ ];
|
|
};
|
|
private.tcp.ports = mkOption {
|
|
type = types.listOf types.port;
|
|
default = [ ];
|
|
};
|
|
private.udp.ports = mkOption {
|
|
type = types.listOf types.port;
|
|
default = [ ];
|
|
};
|
|
|
|
public.tcp.ranges = mkOption {
|
|
type = types.listOf (types.attrsOf types.port);
|
|
default = [ ];
|
|
};
|
|
public.udp.ranges = mkOption {
|
|
type = types.listOf (types.attrsOf types.port);
|
|
default = [ ];
|
|
};
|
|
private.tcp.ranges = mkOption {
|
|
type = types.listOf (types.attrsOf types.port);
|
|
default = [ ];
|
|
};
|
|
private.udp.ranges = mkOption {
|
|
type = types.listOf (types.attrsOf types.port);
|
|
default = [ ];
|
|
};
|
|
|
|
public.interfaces = mkOption {
|
|
type = types.listOf types.str;
|
|
description = "Public firewall interfaces";
|
|
default = [ ];
|
|
};
|
|
private.interfaces = mkOption {
|
|
type = types.listOf types.str;
|
|
description = "Private firewall interfaces";
|
|
default = [ ];
|
|
};
|
|
};
|
|
}
|