{ pkgs , lib , config , plasma-manager , ... }: with lib; let cfg = config.home.plasma; in { options.home.plasma = { enable = mkEnableOption "plasma desktop and configuration"; specialise = mkEnableOption "enable plasma in a specialisation"; extraConfig = mkOption { type = with types; anything; default = { }; description = "extra plasma-manager configuration"; }; }; config = { users.homeModules = [ # this module passes plasma configuration to home-manager { passthrough.plasma = cfg; } ]; services.desktopManager.plasma6 = mkIf cfg.enable { enable = true; }; home-manager.backupFileExtension = mkIf cfg.enable "old"; home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; services.blueman = mkIf cfg.enable { enable = mkForce false; }; home = mkIf cfg.enable { catppuccin.enable = mkForce false; }; specialisation.plasma = mkIf cfg.specialise { configuration.home.plasma.enable = true; }; }; }