feat(plasma): add plasma-manager

This commit is contained in:
514fpv 2024-05-13 08:55:58 +08:00
parent 49fe8142ad
commit c658361fb5
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
4 changed files with 96 additions and 0 deletions

38
home/plasma/nixos.nix Normal file
View file

@ -0,0 +1,38 @@
{ pkgs
, lib
, config
, plasma-manager
, ... }: with lib; let
cfg = config.home.plasma;
in {
options.home.plasma = {
enable = mkEnableOption "plasma desktop and configuration";
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.sharedModules = mkIf cfg.enable [
plasma-manager.homeManagerModules.plasma-manager
];
services.blueman = mkIf cfg.enable {
enable = mkForce false;
};
home = mkIf cfg.enable {
catppuccin.enable = mkForce false;
};
};
}