nixos-config/nixos/components/network/tinc/default.nix
Ingolf Wagner b75c2e9e0a
use clan-fact-generators now
Update facts/secrets for service tinc_secret in machine cherry

Update facts/secrets for service tinc_private in machine cherry

Update facts/secrets for service zerotier in machine test

Update facts/secrets for service wireguard in machine test

Update facts/secrets for service tinc in machine test

Update facts/secrets for service ssh in machine test

Update facts/secrets for service openssh in machine test
2024-06-02 15:20:05 +02:00

37 lines
914 B
Nix

{ lib, config, factsGenerator, ... }:
with lib;
{
options.tinc = {
private = {
enable = mkEnableOption "private tinc setup";
ipv4 = mkOption { type = types.str; };
subnet = mkOption {
type = types.str;
default = "10.23.42.0/24";
};
};
secret = {
enable = mkEnableOption "secret tinc setup";
ipv4 = mkOption {
type = types.str;
};
};
};
config = mkMerge [
(mkIf config.tinc.private.enable (import ./private.nix {
ipv4 = config.tinc.private.ipv4;
ipv6 = null;
inherit (lib) optionalString concatStringsSep mapAttrsToList;
inherit config factsGenerator;
}))
(mkIf config.tinc.secret.enable (import ./secret.nix {
ipv4 = config.tinc.secret.ipv4;
ipv6 = null;
inherit (lib) optionalString concatStringsSep mapAttrsToList;
inherit config factsGenerator;
}))
];
}