dotfiles/nixos/secret-lib/network.nix
Magic_RB 648e6cf8c1
basic hostap config
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2023-02-14 20:18:11 +01:00

64 lines
1.4 KiB
Nix

# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
#
# SPDX-License-Identifier: LGPL-3.0-or-later
{lib, ...}:
with lib;
let
mkIpOption =
mkOption {
description = ''
Host IP
'';
type = types.str;
default = "";
};
mkNetworkOption =
mkOption {
description = ''
Network IPs
'';
type = types.str;
default = "";
};
in
{
options = {
network.ips = {
vault.dns = mkIpOption;
vault.vpn = mkIpOption;
blowhole.dns = mkIpOption;
blowhole.ip = mkIpOption;
blowhole.vpn = mkIpOption;
heater = mkIpOption;
edge.vpn = mkIpOption;
omen.vpn = mkIpOption;
toothpick = mkIpOption;
woodchip = mkIpOption;
media = mkIpOption;
};
network.dhcpd.blowhole-lan = mkOption {
description = ''
Secret config specific to blowhole's lan dhcpcd.
'';
type = types.str;
default = "";
};
network.dhcpd.blowhole-wlan = mkOption {
description = ''
Secret config specific to blowhole's wlan dhcpcd.
'';
type = types.str;
default = "";
};
network.networks = {
home.inner = mkNetworkOption;
home.outer = mkNetworkOption;
home.mine = mkNetworkOption;
vpn = mkNetworkOption;
};
};
}