about summary refs log tree commit diff
path: root/modules/nixos/kde.nix
blob: 17fcf03b1be992cd4d2ff635771c2a4256a8a520 (plain) (blame)
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
41
42
43
44
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.kde;
in {
  options.nixfiles.modules.kde.enable = mkEnableOption "KDE Plasma";

  config = mkIf cfg.enable {
    nixfiles.modules = {
      gnupg.pinentry = "qt";
      sound.enable = true;
      x11.enable = true;
    };

    hm = {
      home.sessionVariables.GTK_USE_PORTAL = 1;

      programs.firefox.profiles.default.settings = {
        "widget.use-xdg-desktop-portal.file-picker" = 1;
        "widget.use-xdg-desktop-portal.mime-handler" = 1;
      };
    };

    services.xserver = {
      desktopManager.plasma5.enable = true;
      displayManager.sddm.enable = true;
    };

    environment = {
      systemPackages = with pkgs; [pinentry-qt];
      plasma5.excludePackages = with pkgs.plasma5Packages; [
        elisa
        gwenview
        khelpcenter
        okular
        print-manager
      ];
    };
  };
}

Consider giving Nix/NixOS a try! <3