dotfiles/nixos/secret-lib/network.nix
main 8b700b61cc
Make sure everything evaluates and builds even without secrets
Signed-off-by: main <magic_rb@redalder.org>
2022-11-23 20:48:59 +01:00

48 lines
1 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.networks = {
home.inner = mkNetworkOption;
home.outer = mkNetworkOption;
home.mine = mkNetworkOption;
vpn = mkNetworkOption;
};
};
}