clear (refactor options): refactor options

This commit is contained in:
Kirill Samoylenkov 2025-10-01 20:20:47 +05:00
parent 00ea2b0c36
commit bfce36ce73
22 changed files with 340 additions and 463 deletions

View file

@ -5,31 +5,24 @@
...
}:
let
inherit (lib) mkOption mkEnableOption mkIf;
inherit (lib.types) bool;
cfg = config.host.window_managers.kde;
in
{
options = {
host.window_managers.kde = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "KDE Clear configurations for host.";
};
sddm.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "SDDM configurations for host.";
};
options.host.window_managers.kde = {
enable = mkEnableOption "KDE Clear configurations for host.";
sddm.enable = mkEnableOption "SDDM configurations for host.";
powerProfiles.enable = lib.mkOption {
type = lib.types.bool;
default = !config.device.laptop.battery.enable;
description = "Power Profiles Daemon configurations for host.";
};
powerProfiles.enable = mkOption {
type = bool;
default = !config.device.laptop.battery.enable;
description = "Power Profiles Daemon configurations for host.";
};
};
config = lib.mkIf cfg.enable {
config = mkIf cfg.enable {
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
@ -48,7 +41,7 @@ in
services.power-profiles-daemon.enable = cfg.powerProfiles.enable;
services.displayManager.sddm = lib.mkIf cfg.sddm.enable {
services.displayManager.sddm = mkIf cfg.sddm.enable {
enable = true;
wayland.enable = true;
};