summaryrefslogtreecommitdiff
path: root/components/gui/xfce.nix
blob: 5e413afb57fb7759c9f33cdb0a55455a942e8a6f (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
{inputs, lib, config, pkgs, ...}:
let
  thunar-archive-plugin-with-xarchiver = pkgs.thunar-archive-plugin.overrideAttrs (old: {
    postInstall = (old.postInstall or "") + ''
      cp ${pkgs.xarchiver}/libexec/thunar-archive-plugin/xarchiver.tap \
         $out/libexec/thunar-archive-plugin/
    '';
  });
in {
  options.xfce.enable = lib.mkEnableOption "Xfce Desktop Environment";

  config = lib.mkIf config.xfce.enable {
    services.xserver = {
      enable = true;

      desktopManager.xfce.enable = true;
    };

    # File manager
    programs.thunar = {
      enable = true;

      plugins = with pkgs; [
        thunar-archive-plugin-with-xarchiver
        thunar-media-tags-plugin
        thunar-vcs-plugin
        thunar-volman
      ];
    };

    # XDG
    xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];

    # Packages
    environment.systemPackages = with pkgs; [
      xarchiver

      xfce4-whiskermenu-plugin
      xfce4-docklike-plugin
      inputs.xfce4-hiddenapps-plugin.packages.x86_64-linux.default
    ];

    # Excluded
    environment.xfce.excludePackages = with pkgs; [ parole ];
  };
}