add (host options): add basic host options
This commit is contained in:
parent
83abf471a4
commit
0d99d55ef5
7 changed files with 242 additions and 0 deletions
58
options/host/window_managers.nix
Normal file
58
options/host/window_managers.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
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.";
|
||||
};
|
||||
|
||||
powerProfiles.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = !config.device.battery.enable;
|
||||
description = "Power Profiles Daemon configurations for host.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
kate
|
||||
elisa
|
||||
konsole
|
||||
kdepim-runtime
|
||||
plasma-browser-integration
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.wl-clipboard
|
||||
pkgs.wayland-utils
|
||||
]
|
||||
++ lib.optional cfg.sddm.enable [
|
||||
pkgs.kdePackages.sddm-kcm
|
||||
];
|
||||
|
||||
services.power-profiles-daemon.enable = cfg.powerProfiles.enable;
|
||||
|
||||
services.displayManager.sddm = lib.mkIf cfg.sddm.enable {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in a new issue