Files
nix/users/configs/btop/default.nix
Nikolaos Karaolidis e89758467a Add btop theming
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-06-27 14:21:16 +03:00

39 lines
999 B
Nix

{ user ? throw "user argument is required", gpu ? false }: { config, lib, pkgs, ... }:
let
hmConfig = config.home-manager.users."${user.name}";
in
{
home-manager.users."${user.name}" = {
programs = {
btop = {
enable = true;
settings = {
color_theme = "matugen";
theme_background = false;
presets = "";
vim_keys = true;
shown_boxes = "cpu mem net proc gpu0 gpu1";
update_ms = 1000;
proc_tree = true;
cpu_single_graph = true;
disks_filter = "/ /nix /persist /cache";
};
};
matugen.settings.templates.btop = {
input_path = ./theme.theme;
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
};
};
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
name = "reload-btop";
runtimeInputs = with pkgs; [ procps ];
text = ''
pkill btop -SIGUSR2
'';
})} &";
};
}