From 03f89ba0d3008ae97d090d707c8f47b67545e98f Mon Sep 17 00:00:00 2001 From: datsudo <76833632+datsudo@users.noreply.github.com> Date: Wed, 4 Jun 2025 13:02:48 +0800 Subject: [PATCH] reconfigure services/theming for hyprland --- user/theming.nix | 5 ++++- user/utils.nix | 39 ++++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/user/theming.nix b/user/theming.nix index e4c9c1c..894dad4 100644 --- a/user/theming.nix +++ b/user/theming.nix @@ -4,6 +4,9 @@ let cfg = config.theming.dock; in { + imports = [ + ../shared/hyprland.nix + ]; options.theming.dock = { enable = lib.mkOption { default = false; @@ -17,7 +20,7 @@ in config = { home.pointerCursor = { - x11.enable = true; + x11.enable = !config.shared.hyprland.enable; name = "Bibata-Modern-Classic"; package = pkgs.bibata-cursors; gtk.enable = true; diff --git a/user/utils.nix b/user/utils.nix index c13121e..6ef0c3e 100644 --- a/user/utils.nix +++ b/user/utils.nix @@ -1,34 +1,47 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let + inherit (lib) mkOption mkIf mkMerge types; cfg = config.utils; in { - imports = [ ./subs/sxhkd.nix ]; + imports = [ ./subs/sxhkd.nix ../shared/hyprland.nix ]; options.utils = { - rofi.enable = lib.mkOption { + rofi.enable = mkOption { default = true; - type = lib.types.bool; + type = types.bool; }; - sxhkd.enable = lib.mkOption { + sxhkd.enable = mkOption { default = true; - type = lib.types.bool; + type = types.bool; }; - flameshot.enable = lib.mkOption { + flameshot.enable = mkOption { default = true; - type = lib.types.bool; + type = types.bool; }; - mako.enable = lib.mkOption { - default = false; - type = lib.types.bool; + mako.enable = mkOption { + default = config.shared.hyprland.enable; + type = types.bool; }; }; config = { - programs.rofi.enable = cfg.rofi.enable; + programs = mkMerge [ + { rofi.enable = cfg.rofi.enable; } - subs.sxhkd.enable = cfg.sxhkd.enable; + (mkIf (!config.shared.hyprland.enable) { + rofi.package = pkgs.rofi; + }) + + (mkIf config.shared.hyprland.enable { + rofi.package = pkgs.rofi-wayland; + }) + ]; + + subs.sxhkd = mkIf (!config.shared.hyprland.enable && cfg.sxhkd.enable) { + enable = true; + }; services.flameshot = { enable = cfg.flameshot.enable;