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