about summary refs log tree commit diff
path: root/modules/nixos/kde.nix
blob: a430294032baf115e4e6bb760f791765bdd3e8c0 (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
45
46
47
48
49
{
  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;
        excludePackages = with pkgs.plasma5Packages; [
          elisa
          gwenview
          khelpcenter
          okular
          print-manager
        ];
      };
      displayManager = {
        sddm.enable = true;

        # NOTE https://github.com/NixOS/nixpkgs/pull/199881
        setupCommands = lib.mkForce "";
      };
    };

    environment.systemPackages = with pkgs; [pinentry-qt];
  };
}

Consider giving Nix/NixOS a try! <3