Files
nix/modules/nih/domains/tailscale.nix
Gustavo "Guz" L. de Mello 5ce99497d7 refactor!: I went too close into the sun
Simlified everything, things were getting out of control
2024-04-08 16:37:29 -03:00

25 lines
496 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.nih.domains.handlers.tailscale;
in {
imports = [];
options.nih.domains.handlers.tailscale = with lib;
with lib.types; {
enable = mkOption {
type = bool;
default = config.nih.domains.enable && config.nih.domains.handler == "tailscale";
};
};
config = with lib;
mkIf cfg.enable {
services.tailscale = {
enable = mkDefault true;
useRoutingFeatures = mkDefault "server";
};
};
}