summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2024-11-04 13:24:31 +0100
committertv <tv@krebsco.de>2024-11-04 13:24:31 +0100
commit46aedaff7e9538f39669a2854297b35e36a317d9 (patch)
treef66b70440dc68142876ed7881181f62a72884e2d
parentb3994ad9a2ecdff6cfc107f9da350ca509024dde (diff)
htop: configs -> pkgs/overrides
-rw-r--r--configs/default.nix1
-rw-r--r--configs/htop.nix39
-rw-r--r--pkgs/override/htop.nix36
3 files changed, 36 insertions, 40 deletions
diff --git a/configs/default.nix b/configs/default.nix
index 5d74d96..917e508 100644
--- a/configs/default.nix
+++ b/configs/default.nix
@@ -11,7 +11,6 @@
imports = [
./backup.nix
./bash
- ./htop.nix
./nets/hkw.nix
./networkd.nix
./nginx
diff --git a/configs/htop.nix b/configs/htop.nix
deleted file mode 100644
index e60cc51..0000000
--- a/configs/htop.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ pkgs, ... }: {
- nixpkgs.config.packageOverrides = super: {
- htop = pkgs.symlinkJoin {
- name = "htop";
- paths = [
- (pkgs.writeDashBin "htop" ''
- export HTOPRC=${pkgs.writeText "htoprc" ''
- fields=0 48 17 18 38 39 40 2 46 47 49 1
- sort_key=46
- sort_direction=1
- hide_threads=0
- hide_kernel_threads=1
- hide_userland_threads=0
- shadow_other_users=1
- show_thread_names=1
- show_program_path=1
- highlight_base_name=1
- highlight_megabytes=1
- highlight_threads=1
- tree_view=1
- header_margin=0
- detailed_cpu_time=0
- cpu_count_from_zero=0
- update_process_names=0
- account_guest_in_cpu_meter=1
- color_scheme=0
- delay=15
- left_meters=LeftCPUs2 RightCPUs2 Memory Swap
- left_meter_modes=1 1 1 1
- right_meters=Uptime Tasks LoadAverage Battery
- right_meter_modes=2 2 2 2
- ''}
- exec ${super.htop}/bin/htop "$@"
- '')
- super.htop
- ];
- };
- };
-}
diff --git a/pkgs/override/htop.nix b/pkgs/override/htop.nix
new file mode 100644
index 0000000..38a19e0
--- /dev/null
+++ b/pkgs/override/htop.nix
@@ -0,0 +1,36 @@
+self: super:
+self.symlinkJoin {
+ name = "htop";
+ paths = [
+ (self.writeDashBin "htop" ''
+ export HTOPRC=${self.writeText "htoprc" ''
+ fields=0 48 17 18 38 39 40 2 46 47 49 1
+ sort_key=46
+ sort_direction=1
+ hide_threads=0
+ hide_kernel_threads=1
+ hide_userland_threads=0
+ shadow_other_users=1
+ show_thread_names=1
+ show_program_path=1
+ highlight_base_name=1
+ highlight_megabytes=1
+ highlight_threads=1
+ tree_view=1
+ header_margin=0
+ detailed_cpu_time=0
+ cpu_count_from_zero=0
+ update_process_names=0
+ account_guest_in_cpu_meter=1
+ color_scheme=0
+ delay=15
+ left_meters=LeftCPUs2 RightCPUs2 Memory Swap
+ left_meter_modes=1 1 1 1
+ right_meters=Uptime Tasks LoadAverage Battery
+ right_meter_modes=2 2 2 2
+ ''}
+ exec ${super.htop}/bin/htop "$@"
+ '')
+ super.htop
+ ];
+}