networking options completed
This commit is contained in:
@@ -1,18 +1,71 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.homelab.networking;
|
||||
in
|
||||
{
|
||||
options.homelab.networking = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable homelab networking support.";
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "river";
|
||||
description = "The user to run tailscale's services as.";
|
||||
};
|
||||
|
||||
# core
|
||||
core = {
|
||||
firewall = {
|
||||
allowPing = lib.mkEnableOption "Enable ICMP Pinging" {
|
||||
enable = true;
|
||||
default = true;
|
||||
};
|
||||
|
||||
ports = {
|
||||
tcp = lib.mkOption {
|
||||
type = with lib.types; listOf number;
|
||||
default = [
|
||||
22
|
||||
80
|
||||
];
|
||||
};
|
||||
udp = lib.mkOption {
|
||||
type = with lib.types; listOf number;
|
||||
default = [ 53 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraHosts = lib.mkOption {
|
||||
type =
|
||||
with lib.types;
|
||||
listOf (
|
||||
submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
ip_address = lib.mkOption {
|
||||
type = str;
|
||||
};
|
||||
|
||||
hostname = lib.mkOption {
|
||||
type = str;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
default = [ ];
|
||||
description = "Additional hosts to add.";
|
||||
};
|
||||
|
||||
nameservers = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
|
||||
default = [
|
||||
"192.168.1.193"
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
];
|
||||
description = "DNS Resolvers for System";
|
||||
};
|
||||
};
|
||||
|
||||
# wireguard
|
||||
@@ -61,5 +114,13 @@ in
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
# tailscale
|
||||
tailscale = {
|
||||
enable = lib.mkEnableOption "Enable Tailscale Mesh VPN" {
|
||||
enable = true;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user