{ config, lib, pkgs, ... }: let cfg = config.os.srv.files; in { options.os.srv.files = { thunar.enable = lib.mkEnableOption "enables the thunar file manager"; utils.enable = lib.mkEnableOption "enables compression and trash utilities"; }; config = lib.mkMerge [ { os.srv.files.utils.enable = lib.mkDefault cfg.thunar.enable; } (lib.mkIf cfg.thunar.enable { programs.thunar = { enable = true; plugins = with pkgs; [ thunar-volman thunar-archive-plugin ]; }; services = { tumbler.enable = true; gnome.gnome-keyring.enable = true; }; environment.systemPackages = with pkgs; [ file-roller ]; }) (lib.mkIf cfg.utils.enable { services.gvfs.enable = true; environment.systemPackages = with pkgs; [ trashy gdu pxz pigz ]; }) ]; }