OOKNET                             [ /  search the index  ]  
──────────────────────────────────────────────────────────────────────────────────────
══════════════════════════════════════════════════════════════════════════════════════
OOKNET   [ /  search  ]  
────────────────────────────────────────────────
════════════════════════════════════════════════
 
 
main @ 39 LINES
 
[ HISTORY ]  [ UP ]
 

{lib, ...}: let
  inherit (lib) mkOption mkEnableOption;
  inherit (lib.types) str nullOr listOf enum bool;
in {
  options.ooknet.server = {
    exitNode = mkOption {
      type = bool;
      default = false;
      description = "Whether the server will act as a tailscale exit node or not";
    };
    profile = mkOption {
      type = nullOr (enum ["linode" "ookstest"]);
      default = null;
      description = "The server profile the host will use as a base";
    };
    services = mkOption {
      type = listOf (enum ["media-server" "website" "forgejo" "ookflix" "minecraft
" "minecraft-proxy" "copyparty" "monitoring" "authelia" "authentik"]);
      default = [];
      description = "List of services the server will host";
    };
    domain = mkOption {
      type = str;
      default = "";
    };

    webserver = {
      caddy = {
        enable = mkEnableOption "";
        cloudflare.enable = mkEnableOption "";
        # lock 80/443 to cloudflare ip ranges (origin cant be reached directly)
        cloudflareOnly = mkEnableOption "restricting 80/443 ingress to Cloudflare 
ranges";
      };
    };
    database = {
      postgresql.enable = mkEnableOption "";
    };
  };
}

{lib, ...}: let
  inherit (lib) mkOption mkEnableOption;
  inherit (lib.types) str nullOr listOf enum
 bool;
in {
  options.ooknet.server = {
    exitNode = mkOption {
      type = bool;
      default = false;
      description = "Whether the server will
 act as a tailscale exit node or not";
    };
    profile = mkOption {
      type = nullOr (enum ["linode" "ookstes
t"]);
      default = null;
      description = "The server profile the 
host will use as a base";
    };
    services = mkOption {
      type = listOf (enum ["media-server" "w
ebsite" "forgejo" "ookflix" "minecraft" "min
ecraft-proxy" "copyparty" "monitoring" "auth
elia" "authentik"]);
      default = [];
      description = "List of services the se
rver will host";
    };
    domain = mkOption {
      type = str;
      default = "";
    };

    webserver = {
      caddy = {
        enable = mkEnableOption "";
        cloudflare.enable = mkEnableOption "
";
        # lock 80/443 to cloudflare ip range
s (origin cant be reached directly)
        cloudflareOnly = mkEnableOption "res
tricting 80/443 ingress to Cloudflare ranges
";
      };
    };
    database = {
      postgresql.enable = mkEnableOption "";
    };
  };
}
 
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET