dotfiles/modules/home/fetch.nix

84 lines
1.9 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, inputs, ... }:
let
cfg = config.my.fetch;
in {
options.my.fetch = {
fastfetch.enable = lib.mkEnableOption null;
neofetch.enable = lib.mkEnableOption null;
others.enable = lib.mkEnableOption null;
};
config = lib.mkMerge [
(lib.mkIf cfg.fastfetch.enable {
home.packages = [
(inputs.my-nix-packages.packages.${pkgs.system}.fastfetch.overrideAttrs {
flashfetchModules = [
"title"
"separator"
"os"
"kernel"
"uptime"
"shell"
"display"
"wm"
"theme"
"icons"
"font"
"cursor"
"terminal"
"terminalFont"
"cpu"
"gpu"
"memory"
"disk"
"battery"
"locale"
];
})
];
})
(lib.mkIf cfg.neofetch.enable {
home.packages = [ pkgs.neofetch ];
xdg.configFile = {
"neofetch/config.conf".text = ''
print_info() {
info title
info underline
info "OS" distro
info "Host" model
info "Kernel" kernel
info "Uptime" uptime
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" term_font
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
info cols
}
memory_percent="on"
shell_path="on"
speed_shorthand="off"
'';
};
})
(lib.mkIf cfg.others.enable {
home.packages = with pkgs; [
nitch
(uwufetch.overrideAttrs (old: {
preBuild = old.preBuild or "" + ''
mkdir -p $out/include
'';
}))
];
})
];
}