aboutsummaryrefslogtreecommitdiff
path: root/modules/services/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/options.nix')
-rw-r--r--modules/services/options.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/services/options.nix b/modules/services/options.nix
index 231c949..085895e 100644
--- a/modules/services/options.nix
+++ b/modules/services/options.nix
@@ -47,7 +47,6 @@ in {
};
tailscale.enable = mkEnableOption "tailscale";
-
sshd = {
enable = mkEnableOption "OpenSSH server";
bind_host = mkOption {
@@ -133,6 +132,18 @@ in {
assertion = with config.collinux.services.networking; (iwd.enable && !networkmanager.enable && !networkd.enable) || (!iwd.enable && networkmanager.enable && !networkd.enable) || (!iwd.enable && !networkmanager.enable && networkd.enable);
message = "only one networking method (iwd, networkmanager, networkd) can be active";
}
+ {
+ assertion = with config.collinux.services.networking; !(wireguard.enable && tailscale.enable);
+ message = "only one vpn method (tailscale, wireguard) can be active";
+ }
+ {
+ assertion = with config.collinux.services.networking; wireguard.enable && !networkd.enable;
+ message = "wireguard configuration only supports networkd at the moment";
+ }
+ {
+ assertion = with config.collinux.services.networking.wireguard; enable && (peersConfig |> (builtins.filter (m: m.role == "hub")) |> lib.count) == 1;
+ message = "there must be exactly one hub in the wireguard configuration";
+ }
];
};
}