From dedd95c442e41789c370532b6ed2d7fa52fceab2 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 1 Apr 2025 22:20:26 -0400 Subject: [PATCH] fix: resolve conflicting module options Apparently you aren't allowed to define the same option in multiple modules, even if the definitions are identical. --- modules/forgejo/options.nix | 9 ++------- modules/options.nix | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/modules/forgejo/options.nix b/modules/forgejo/options.nix index ca36137..102255d 100644 --- a/modules/forgejo/options.nix +++ b/modules/forgejo/options.nix @@ -1,13 +1,8 @@ args@{ config, lib, ... }: { - options.aether = { - # Referenced general options - inherit (import ../options.nix args) - domain - https - acmeEmail; + imports = [ ../options.nix ]; - # Module-specific options + options.aether = { forgejo = { subdomain = lib.mkOption { type = lib.types.nullOr lib.types.str; diff --git a/modules/options.nix b/modules/options.nix index 5d606d0..a482a52 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -1,19 +1,21 @@ { lib, ... }: { - domain = lib.mkOption { - type = lib.types.str; - description = "The domain name the server is hosted on."; - }; + options.aether = { + domain = lib.mkOption { + type = lib.types.str; + description = "The domain name the server is hosted on."; + }; - https = lib.mkOption { - type = lib.types.boolByOr; - default = true; - description = "Whether to force HTTPS connections for websites."; - }; + https = lib.mkOption { + type = lib.types.boolByOr; + default = true; + description = "Whether to force HTTPS connections for websites."; + }; - acmeEmail = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = "Email address for ACME."; + acmeEmail = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "Email address for ACME."; + }; }; }