{ pkgs, lib, config, ... }: let cfg = config.programs.thunderbird; in { options = { programs.thunderbird = { firejail.args = lib.mkOption { description = "Arguments to pass to the firejail sandboxing thunderbird"; type = with lib.types; listOf str; default = [ "--profile=${pkgs.firejail}/etc/firejail/thunderbird.profile" ]; }; }; }; config = { home.packages = [ (pkgs.firejailWrap { package = pkgs.thunderbird; inherit (cfg.firejail) args; }) ]; }; }