summaryrefslogtreecommitdiff
path: root/modules/nixos/desktop/plasma/default.nix
blob: c4d8c9557db9d74f06c7fdeef620f7fbfb5dfb8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.desktop.plasma;
in {
  options.desktop.plasma.enable = lib.mkEnableOption "Plasma desktop";

  config = lib.mkIf cfg.enable (
    # this is bad, i don't care
    lib.optionalAttrs (lib.versionAtLeast lib.version "24.05pre-git") {
      environment = {
        plasma6.excludePackages = with pkgs.kdePackages; [
          khelpcenter
          plasma-browser-integration
          print-manager
        ];

        sessionVariables = {
          NIXOS_OZONE_WL = "1";
        };

        systemPackages = with pkgs; [
          haruna
        ];
      };

      services.xserver = {
        displayManager.sddm = {
          enable = true;
          wayland.enable = true;
        };

        desktopManager.plasma6.enable = true;
      };
    }
  );
}