diff --git a/home/tmux/default.nix b/home/tmux/default.nix index 08aeb55..e554fd0 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -11,19 +11,6 @@ in enable = my.mkDisableOption "tmux terminal multiplexer"; enablePassthrough = mkEnableOption "tmux DCS passthrough sequence"; - - trueColorTerminals = mkOption { - type = with types; listOf str; - default = lib.my.nullableToList config.my.home.terminal.program; - defaultText = '' - `[ config.my.home.terminal.program ]` if it is non-null, otherwise an - empty list. - ''; - example = [ "xterm-256color" ]; - description = '' - $TERM values which should be considered to always support 24-bit color. - ''; - }; }; config.programs.tmux = lib.mkIf cfg.enable { @@ -88,14 +75,6 @@ in set -g allow-passthrough on '' } - - # Force 24-bit color for each relevant $TERM - ${ - let - mkTcFlag = term: ''set -as terminal-features ",${term}:RGB"''; - in - lib.concatMapStringsSep "\n" mkTcFlag cfg.trueColorTerminals - } ''; }; } diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 7f9d659..ac73da6 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -20,6 +20,8 @@ # I use scripts that use the passthrough sequence often on this host my.home.tmux.enablePassthrough = true; - # HTerm uses `xterm-256color` as its `$TERM`, so use that here - my.home.tmux.trueColorTerminals = [ "xterm-256color" ]; + programs.tmux.extraConfig = '' + # Setup 24-bit color explicitly, as the default terminfo entry does not + set-option -sa terminal-overrides ",xterm-256color:Tc" + ''; } diff --git a/lib/lists.nix b/lib/lists.nix index 6c2fadd..190198e 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -24,10 +24,4 @@ in # (any -> value) # [ any ] mapFilter = pred: f: attrs: filter pred (map f attrs); - - # Transform a nullable value into a list of zero/one element. - # - # nullableToList :: - # (nullable a) -> [ a ] - nullableToList = x: if x != null then [ x ] else [ ]; }