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.nix32
1 files changed, 22 insertions, 10 deletions
diff --git a/modules/services/options.nix b/modules/services/options.nix
index f42dd12..2084c45 100644
--- a/modules/services/options.nix
+++ b/modules/services/options.nix
@@ -31,8 +31,20 @@ in {
default = null;
};
};
- tailscale.enable = mkEnableOption "tailscale";
- sshd.enable = mkEnableOption "OpenSSH server";
+ tailscale = {
+ enable = mkEnableOption "tailscale";
+ tailnet = mkOption {
+ type = lib.types.str;
+ default = "tail7cca06.ts.net";
+ };
+ };
+ sshd = {
+ enable = mkEnableOption "OpenSSH server";
+ bind_host = mkOption {
+ type = ip_addr;
+ default = "0.0.0.0";
+ };
+ };
};
audio = {
enable = mkEnableOption "pipewire + wireplumber";
@@ -54,21 +66,17 @@ in {
enable = mkEnableOption "";
bind_host = mkOption {
type = ip_addr;
- default =
- if config.collinux.services.networking.tailscale.enable
- then "100.69.160.89"
- else "0.0.0.0";
+ default = "0.0.0.0";
};
port = mkOption {
type = lib.types.port;
default = default_port;
};
-
root_url = mkOption {
type = lib.types.str;
- default =
- if config.collinux.services.networking.tailscale.enable
- then "https://${service_name}.tail7cca06.ts.net"
+ default = with config.collinux.services.networking.tailscale;
+ if enable
+ then "https://${service_name}.${tailnet}"
else null;
};
};
@@ -81,6 +89,10 @@ in {
service_name = "forgejo";
default_port = 8010;
};
+ headscale = selfhostOptions {
+ service_name = "headscale";
+ default_port = 8080;
+ };
caddy = {
enable = mkEnableOption "caddy https server";
envFile = mkOption {