1{ config, lib, pkgs, ... }:
2
3let cfg = config.programs.thunar;
4
5in {
6 meta = {
7 maintainers = lib.teams.xfce.members;
8 };
9
10 options = {
11 programs.thunar = {
12 enable = lib.mkEnableOption "Thunar, the Xfce file manager";
13
14 plugins = lib.mkOption {
15 default = [];
16 type = lib.types.listOf lib.types.package;
17 description = "List of thunar plugins to install.";
18 example = lib.literalExpression "with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]";
19 };
20
21 };
22 };
23
24 config = lib.mkIf cfg.enable (
25 let package = pkgs.xfce.thunar.override { thunarPlugins = cfg.plugins; };
26
27 in {
28 environment.systemPackages = [
29 package
30 ];
31
32 services.dbus.packages = [
33 package
34 ];
35
36 systemd.packages = [
37 package
38 ];
39
40 programs.xfconf.enable = true;
41 }
42 );
43}