Files
nix/modules/nih/domains/default.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

33 lines
607 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.nih.domains;
in {
imports = [
./tailscale.nix
./tailscale-caddy.nix
];
options.nih.domains = with lib;
with lib.types; {
enable = mkOption {
type = bool;
default = false;
};
domain = mkOption {
type = str;
default = "${config.nih.name}.local";
};
handler = mkOption {
type = enum ["tailscale" "tailscale-caddy" "adguard" "adguard-caddy"];
default = "tailscale";
};
};
config = with lib;
mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [80 433];
};
}