Compare commits
No commits in common. "6ddbf26049211d5042dc05706763766559d8e925" and "af0b63c38c86ae772ad2b7f14a7f1135aa1850bb" have entirely different histories.
6ddbf26049
...
af0b63c38c
|
@ -1,6 +1,4 @@
|
|||
{lib}: {
|
||||
imports=[./net.nix];
|
||||
|
||||
dirToStrings = dir: (map (v: builtins.readFile "${dir}/${v}")
|
||||
(builtins.filter (v:
|
||||
(builtins.readFileType "${dir}/${v}") == "regular") (
|
||||
|
|
1269
lib/net.nix
1269
lib/net.nix
File diff suppressed because it is too large
Load diff
|
@ -14,10 +14,22 @@
|
|||
type = lib.types.str;
|
||||
description = "Primary human users long name";
|
||||
};
|
||||
gui.enable = lib.mkEnableOption "enable GUI";
|
||||
isLaptop = lib.mkEnableOption "machine is a laptop";
|
||||
isVm = lib.mkEnableOption "machine is a virtual machine";
|
||||
isSever = lib.mkEnableOption "machine is primarily a server";
|
||||
gui.enable = lib.mkEnableOption {
|
||||
description = "enable GUI";
|
||||
default = false;
|
||||
};
|
||||
isLaptop = lib.mkEnableOption {
|
||||
description = "machine is a laptop";
|
||||
default = false;
|
||||
};
|
||||
isVm = lib.mkEnableOption {
|
||||
description = "machine is a virtual machine";
|
||||
default = false;
|
||||
};
|
||||
isSever = lib.mkEnableOption {
|
||||
description = "machine is primarily a server";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports=[./systemd-dhcpServ.nix];
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
host.systemdDhcpSrv = {
|
||||
enable = lib.mkEnableOption "systemd DHCP server";
|
||||
|
||||
interface = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "interface to run dhcp server on";
|
||||
};
|
||||
|
||||
uplinkInterface = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "if dns, router, or ntp are set but no adresses are set, pass on the settings of this interface.";
|
||||
default = ":auto";
|
||||
};
|
||||
|
||||
pool = lib.mkOption {
|
||||
description = "the pool of ips the dhcp server will hand out.";
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
start = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "starting IP of the range the dhcp server will assign";
|
||||
};
|
||||
end = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "ending IP of the range the dhcp server will assign";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
time = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
default = lib.mkOption {
|
||||
description = "the default dhcp lease time, in seconds, defaults to 1h";
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = null;
|
||||
};
|
||||
max = lib.mkOption {
|
||||
description = "the max dhcp lease time, in seconds. defaults to 12h";
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dns = lib.mkoption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "whether to include dns server info in the dhcp lease";
|
||||
};
|
||||
servers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "IPs of dns servers to hand out";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
router = lib.mkoption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "whether to include router (gateway) info in the dhcp lease";
|
||||
};
|
||||
servers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "IPs of dns servers to hand out";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ntp = lib.mkoption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "whether to include ntp server info in the dhcp lease";
|
||||
};
|
||||
servers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "IPs of ntp servers to hand out";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue