41 lines
899 B
Nix
41 lines
899 B
Nix
![]() |
{
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
inherit (builtins) attrValues;
|
||
|
inherit (lib.attrsets) mapAttrsToList;
|
||
|
inherit (lib.strings) concatStringsSep;
|
||
|
|
||
|
btop-settings = {
|
||
|
truecolor = "True";
|
||
|
vim_keys = "True";
|
||
|
rounded_corners = "True";
|
||
|
update_ms = "100";
|
||
|
graph_symbol = "braille";
|
||
|
cpu_single_graph = "True";
|
||
|
clock_format = "%X";
|
||
|
use_fstab = "True";
|
||
|
io_mode = "True";
|
||
|
net_sync = "True";
|
||
|
net_iface = "enp4s0";
|
||
|
log_level = "ERROR";
|
||
|
color_theme = "gruvbox_dark";
|
||
|
};
|
||
|
|
||
|
btop-no-desktop-entry = pkgs.btop.overrideAttrs (prev: {
|
||
|
postInstall = ''
|
||
|
${prev.postInstall or ""}
|
||
|
rm -rf $out/share/applications/*.desktop
|
||
|
'';
|
||
|
});
|
||
|
|
||
|
in
|
||
|
{
|
||
|
packages = attrValues { inherit btop-no-desktop-entry; };
|
||
|
files.".config/btop/btop.conf".text =
|
||
|
concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") btop-settings;
|
||
|
|
||
|
}
|