helm/modules/desktop/term/st.nix

35 lines
858 B
Nix
Raw Permalink Normal View History

# modules/desktop/term/st.nix
#
# I like (x)st. This appears to be a controversial opinion; don't tell anyone,
# mkay?
{ options, config, lib, pkgs, ... }:
2020-03-28 22:48:43 -07:00
with lib;
with lib.my;
let cfg = config.modules.desktop.term.st;
in {
2020-03-28 22:48:43 -07:00
options.modules.desktop.term.st = {
enable = mkBoolOpt false;
2020-03-28 22:48:43 -07:00
};
config = mkIf cfg.enable {
2020-03-28 22:48:43 -07:00
# xst-256color isn't supported over ssh, so revert to a known one
modules.shell.zsh.rcInit = ''
[ "$TERM" = xst-256color ] && export TERM=xterm-256color
'';
2020-03-28 22:48:43 -07:00
user.packages = with pkgs; [
2020-03-28 22:48:43 -07:00
xst # st + nice-to-have extensions
(makeDesktopItem {
name = "xst";
desktopName = "Suckless Terminal";
genericName = "Default terminal";
icon = "utilities-terminal";
exec = "${xst}/bin/xst";
categories = "Development;System;Utility";
})
];
};
}