32 lines
851 B
Nix
32 lines
851 B
Nix
{ pkgs
|
|
, lib
|
|
, config
|
|
, ... }: with lib; let
|
|
cfg = config.home.plasma;
|
|
in {
|
|
options.home.plasma = {
|
|
enable = mkEnableOption "KDE plasma desktop environment";
|
|
};
|
|
|
|
config = {
|
|
users.homeModules = [
|
|
# this module passes plasma configuration to home-manager
|
|
{ passthrough.plasma = cfg; }
|
|
];
|
|
|
|
specialisation.noplasma = with cfg; mkIf enable {
|
|
configuration = {
|
|
home.plasma.enable = mkForce false;
|
|
};
|
|
};
|
|
|
|
programs.regreet.enable = mkIf cfg.enable false;
|
|
services.xserver.enable = mkIf cfg.enable true;
|
|
services.xserver.displayManager.startx.enable = mkIf cfg.enable false;
|
|
services.xserver.displayManager.sddm.enable = mkIf cfg.enable true;
|
|
services.xserver.desktopManager.plasma5.enable = mkIf cfg.enable true;
|
|
|
|
users.home.persist.directories = mkIf cfg.enable [ ];
|
|
};
|
|
}
|