clear (refactor options): refactor options
This commit is contained in:
parent
00ea2b0c36
commit
bfce36ce73
22 changed files with 340 additions and 463 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Reference in a new issue