aboutsummaryrefslogtreecommitdiffstats
path: root/modules/system
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-29 02:22:48 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-29 03:50:32 +0530
commit673e7b8245a67d5627ff41ab1c113c90b4c8c553 (patch)
tree6b5679bb5ee56fa5a5b5eb5dc9e522503815ce9d /modules/system
parent1cc7caf459c25f8dea24e40e68b89aaf4862eef4 (diff)
downloadhome-manager-config-673e7b8245a67d5627ff41ab1c113c90b4c8c553.tar.gz
home-manager-config-673e7b8245a67d5627ff41ab1c113c90b4c8c553.zip
system: removed system-monitor, removed bottom, added btop
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/bottom/default.nix23
-rw-r--r--modules/system/btop/default.nix23
-rw-r--r--modules/system/default.nix3
-rw-r--r--modules/system/system-monitor/assertions.nix19
-rw-r--r--modules/system/system-monitor/default.nix41
-rw-r--r--modules/system/system-monitor/system-monitor.sh26
6 files changed, 24 insertions, 111 deletions
diff --git a/modules/system/bottom/default.nix b/modules/system/bottom/default.nix
deleted file mode 100644
index b037c56..0000000
--- a/modules/system/bottom/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-# Cross-platform graphical process and system monitor
-{
- config,
- lib,
- ...
-}:
-{
- options.system.bottom = {
- enable = lib.mkEnableOption "Enables bottom.";
- package = lib.mkOption {
- type = lib.types.package;
- readOnly = true;
- default = config.programs.bottom.package;
- description = "The bottom package to use.";
- };
- };
-
- config = lib.mkIf config.system.bottom.enable {
- programs.bottom = {
- enable = true;
- };
- };
-}
diff --git a/modules/system/btop/default.nix b/modules/system/btop/default.nix
new file mode 100644
index 0000000..1834aa2
--- /dev/null
+++ b/modules/system/btop/default.nix
@@ -0,0 +1,23 @@
+# Cross-platform graphical process and system monitor
+{
+ config,
+ lib,
+ ...
+}:
+{
+ options.system.btop = {
+ enable = lib.mkEnableOption "Enables btop.";
+ package = lib.mkOption {
+ type = lib.types.package;
+ readOnly = true;
+ default = config.programs.btop.package;
+ description = "The btop package to use.";
+ };
+ };
+
+ config = lib.mkIf config.system.btop.enable {
+ programs.btop = {
+ enable = true;
+ };
+ };
+}
diff --git a/modules/system/default.nix b/modules/system/default.nix
index 9bd3a01..bf19c04 100644
--- a/modules/system/default.nix
+++ b/modules/system/default.nix
@@ -2,13 +2,12 @@
{ ... }:
{
imports = [
- ./bottom
./brightnessctl
+ ./btop
./deep-clean
./htop
./nix-update
./nvtop
- ./system-monitor
./systemctl-tui
];
}
diff --git a/modules/system/system-monitor/assertions.nix b/modules/system/system-monitor/assertions.nix
deleted file mode 100644
index 08b9f7c..0000000
--- a/modules/system/system-monitor/assertions.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ config, ... }:
-[
- {
- assertion = !config.system.system-monitor.enable || config.system.bottom.enable;
- message = "system.system-monitor is enabled but requires `system.bottom.enable`.";
- }
- {
- assertion = !config.system.system-monitor.enable || config.system.nvtop.enable;
- message = "system.system-monitor is enabled but requires `system.nvtop.enable`.";
- }
- {
- assertion = !config.system.system-monitor.enable || config.terminal.tmux.enable;
- message = "system.system-monitor is enabled but requires `terminal.tmux.enable`.";
- }
- {
- assertion = !config.system.system-monitor.enable || config.terminal.kitty.enable;
- message = "system.system-monitor is enabled but requires `terminal.kitty.enable`.";
- }
-]
diff --git a/modules/system/system-monitor/default.nix b/modules/system/system-monitor/default.nix
deleted file mode 100644
index e103ed3..0000000
--- a/modules/system/system-monitor/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-# System monitor script using tmux to run bottom and nvtop side-by-side
-{
- config,
- lib,
- pkgs,
- ...
-}:
-let
- inherit ((import ../../lib/script.nix { inherit lib pkgs; })) mkScriptModule;
- script = mkScriptModule {
- scope = [ "system" ];
- name = "system-monitor";
- path = ./system-monitor.sh;
- description = "System monitor script using tmux to run bottom and nvtop side-by-side\nOpens a tmux session with:\n - Left pane: bottom (system/process monitor)\n - Right pane: nvtop (GPU monitor)";
- deps = [
- config.system.bottom.package
- config.system.nvtop.package
- config.terminal.tmux.package
- config.terminal.kitty.package
- pkgs.bash
- ];
- desktop = {
- enable = true;
- displayName = "System Monitor";
- icon = "bottom-system-monitor";
- };
- inherit config;
- };
-in
-{
- options = script.options;
- config = lib.mkMerge [
- script.config
- {
- assertions = import ./assertions.nix { inherit config lib; };
- home.file.".local/share/icons/hicolor/scalable/apps/bottom-system-monitor.svg" = {
- source = ../../../assets/icons/bottom-system-monitor.svg;
- };
- }
- ];
-}
diff --git a/modules/system/system-monitor/system-monitor.sh b/modules/system/system-monitor/system-monitor.sh
deleted file mode 100644
index 7a9e7ea..0000000
--- a/modules/system/system-monitor/system-monitor.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-SESSION="system-monitor"
-
-kitty @ set-font-size -- -5
-
-cleanup() {
- kitty @ set-font-size -- +5
-}
-trap cleanup EXIT INT TERM
-
-# Kill any existing session
-tmux kill-session -t "$SESSION" 2>/dev/null
-
-# Start new tmux session with btm wrapped to kill session on exit
-tmux new-session -d -s "$SESSION" -c "$HOME" "bash -c 'btm; tmux kill-session -t $SESSION'"
-
-# Split horizontally: right pane runs nvtop wrapped similarly
-tmux split-window -h -t "$SESSION:0" -c "$HOME" "bash -c 'nvtop; tmux kill-session -t $SESSION'"
-
-tmux set -g status off
-tmux set -g mouse on
-tmux set -g focus-events on
-
-# Select main pane and attach
-tmux select-pane -t "$SESSION:0.0"
-tmux attach-session -t "$SESSION"