Set preferred color scheme from theme

After starting Hyprland with a dbus session, we now have access to
set configuration such as a preferred color scheme. As we know what your
theme should be, it makes sense to set this in chimera rather than
requiring you to do so imperatively

Change-Id: I574061911bee41a72ff39983296eba15e72f1985
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/533
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/catppuccin/default.nix b/modules/home/catppuccin/default.nix
index c8f1c2e..e964ada 100644
--- a/modules/home/catppuccin/default.nix
+++ b/modules/home/catppuccin/default.nix
@@ -1421,6 +1421,8 @@
             catppuccinColors.${config.chimera.theme.catppuccin.style}.${config.chimera.theme.catppuccin.color};
         };
 
+        style = if config.chimera.theme.catppuccin.style == "Latte" then "Light" else "Dark";
+
         cursor = {
           package =
             pkgs.catppuccin-cursors."${lib.strings.toLower config.chimera.theme.catppuccin.style}${config.chimera.theme.catppuccin.color}";
diff --git a/modules/home/theme/dconf/default.nix b/modules/home/theme/dconf/default.nix
new file mode 100644
index 0000000..dcfcb3d
--- /dev/null
+++ b/modules/home/theme/dconf/default.nix
@@ -0,0 +1,3 @@
+{ lib, config, ... }: {
+  dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${lib.strings.toLower config.chimera.theme.style}";
+}
diff --git a/modules/home/theme/default.nix b/modules/home/theme/default.nix
index 2817de3..cf01310 100644
--- a/modules/home/theme/default.nix
+++ b/modules/home/theme/default.nix
@@ -83,6 +83,14 @@
       default = null;
     };
 
+    style = lib.mkOption {
+      type = lib.types.enum [
+        "Light"
+        "Dark"
+      ];
+      description = "Whether this theme prefers to match with light or dark color schemes";
+    };
+
     colors =
       let
         themeColor = lib.types.submodule {