{ config, lib, pkgs, ... }: let cfg = config.nixfiles.modules.foot; in { options.nixfiles.modules.foot.enable = lib.mkEnableOption "Foot terminal emulator"; config = lib.mkIf cfg.enable { hm = { home.packages = [ pkgs.libsixel ]; programs.foot = { enable = true; settings = { main = { utmp-helper = "${pkgs.libutempter}/lib/utempter/utempter"; pad = let n = toString config.stylix.fonts.sizes.terminal; in "${n}x${n}"; }; scrollback.lines = lib.pow 2 14; }; }; }; }; }