helm/modules/desktop/term/st.nix
Henrik Lissner a75c64d04a
Rewrite to use flakes
This puts a hard dependency on 20.09, but that's to be expected.
2020-10-11 01:31:33 -04:00

35 lines
858 B
Nix

# 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, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.term.st;
in {
options.modules.desktop.term.st = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
# xst-256color isn't supported over ssh, so revert to a known one
modules.shell.zsh.rcInit = ''
[ "$TERM" = xst-256color ] && export TERM=xterm-256color
'';
user.packages = with pkgs; [
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";
})
];
};
}