Skip to content

Commit

Permalink
ROCm and CUDA support for btop
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Dec 8, 2024
1 parent d4e16f4 commit d03b431
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 25 deletions.
33 changes: 23 additions & 10 deletions modules/home-manager/server/cli/btop.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
{ pkgs, ... }:
{
programs.btop = {
enable = true;
};
config,
pkgs,
lib,
osConfig,
...
}@args:
{
programs.btop =
{
enable = true;
}
// lib.optionals (args ? nixosConfig) {
package = pkgs.btop.override {
rocmSupport = config.facter.detected.graphics.amd.enable;
cudaSupport = config.hosts.nvidia.enable;
};
};

home.file.".config/btop/themes/catppuccin".source = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "btop";
rev = "1.0.0";
sha256 = "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk=";
};
# home.file.".config/btop/themes/catppuccin".source = pkgs.fetchFromGitHub {
# owner = "catppuccin";
# repo = "btop";
# rev = "1.0.0";
# sha256 = "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk=";
# };
}
2 changes: 1 addition & 1 deletion modules/home-manager/server/cli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
./helix
./tmux
./bat.nix
# ./btop.nix
./btop.nix
./editorconfig.nix
./fzf.nix
./misc.nix
Expand Down
3 changes: 0 additions & 3 deletions modules/home-manager/server/cli/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
# Bash
bash.initExtra = ''eval "$(direnv hook bash)"'';

# Htop alternative
btop.enable = true;

direnv = {
enable = true;
nix-direnv.enable = true;
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/environment/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
(with pkgs; [
aileron # helvetica
jetbrains-mono
dejavu_fonts
liberation_ttf # Times New Roman, Arial, and Courier New
# (nerdfonts.override { fonts = [ "FiraCode" ]; })
# unstable.nerd-fonts.fira-code
Expand Down
25 changes: 14 additions & 11 deletions modules/nixos/system/amd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,20 @@
};
};

hardware.graphics = {
enable = true;
# driSupport = true;
enable32Bit = true;
extraPackages =
(with pkgs; [
amdvlk
])
++ (with pkgs.rocmPackages; [
clr.icd
]);
hardware = {
amdgpu.opencl.enable = config.facter.detected.graphics.amd.enable;
graphics = {
enable = true;
# driSupport = true;
enable32Bit = true;
extraPackages =
(with pkgs; [
amdvlk
])
++ (with pkgs.rocmPackages; [
clr.icd
]);
};
};
};
}

0 comments on commit d03b431

Please sign in to comment.