From 0b22f3b9efb6834818b5f8cd68b2cba2a281b7d8 Mon Sep 17 00:00:00 2001
From: punkfairie <marley@punkfairie.net>
Date: Sat, 16 Nov 2024 23:53:24 -0800
Subject: [PATCH] fix(home): Move non-options to config

---
 modules/home/options/theme/default.nix | 31 +++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/modules/home/options/theme/default.nix b/modules/home/options/theme/default.nix
index dfcca97..2a01f69 100644
--- a/modules/home/options/theme/default.nix
+++ b/modules/home/options/theme/default.nix
@@ -83,7 +83,7 @@ let
 in
 {
   options.marleyos.theme = {
-    colors = rec {
+    colors = {
       default = mkOption {
         type = with types; str;
         default = "dark";
@@ -93,12 +93,19 @@ in
       light = mkColorThemeOpt "light" "dawn";
       dark = mkColorThemeOpt "dark" "main";
 
-      inherit (cfg.colors."${cfg.colors.default}") base;
-      inherit (cfg.colors."${cfg.colors.default}") flavor;
-      inherit (cfg.colors."${cfg.colors.default}") accent;
+      base = mkOption {
+        type = colorThemes;
+      };
+      flavor = mkOption {
+        type = with types; nullOr str;
+      };
+      accent = mkOption {
+        type = with types; nullOr str;
+      };
 
-      # HACK: Need to come up with a better solution
-      isRosePine = base == "rose-pine";
+      isRosePine = mkOption {
+        type = with types; bool;
+      };
     };
 
     icons = mkOption {
@@ -115,6 +122,18 @@ in
   };
 
   config = mkMerge [
+    # colors
+    {
+      marleyos.theme.colors = rec {
+        inherit (cfg.colors."${cfg.colors.default}") base;
+        inherit (cfg.colors."${cfg.colors.default}") flavor;
+        inherit (cfg.colors."${cfg.colors.default}") accent;
+
+        # HACK: Need to come up with a better solution
+        isRosePine = base == "rose-pine";
+      };
+    }
+
     # icons
     (mkIf (cfg.icons != null) {
       gtk = mkIf config.gtk.enable (mkDefault {