refactor: add SystemStats singleton + nova-stats daemon for cpu/mem polling
This commit is contained in:
parent
71a843e0f3
commit
136ff53cb5
13 changed files with 371 additions and 196 deletions
|
|
@ -202,7 +202,8 @@ in
|
|||
pkgs.nerd-fonts.symbols-only
|
||||
]
|
||||
++ lib.optional cfg.modules.weather.enable pkgs.wttrbar
|
||||
++ lib.optional cfg.modules.mpris.enable pkgs.cava;
|
||||
++ lib.optional cfg.modules.mpris.enable pkgs.cava
|
||||
++ lib.optional cfg.modules.disk.enable pkgs.coreutils;
|
||||
|
||||
xdg.configFile."nova-shell/modules.json".source =
|
||||
(pkgs.formats.json { }).generate "nova-shell-modules.json"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
makeWrapper,
|
||||
quickshell,
|
||||
qt6,
|
||||
nova-stats,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "nova-shell";
|
||||
|
|
@ -32,7 +33,8 @@ stdenvNoCC.mkDerivation {
|
|||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${lib.getExe quickshell} $out/bin/nova-shell \
|
||||
--add-flags "-p $out/share/nova-shell/shell.qml"
|
||||
--add-flags "-p $out/share/nova-shell/shell.qml" \
|
||||
--prefix PATH : ${lib.makeBinPath [ nova-stats ]}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
|
|
|||
12
nix/stats-daemon.nix
Normal file
12
nix/stats-daemon.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, rustPlatform }:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "nova-stats";
|
||||
version = "0.1.0";
|
||||
src = lib.cleanSource ../stats-daemon;
|
||||
cargoLock.lockFile = ../stats-daemon/Cargo.lock;
|
||||
meta = {
|
||||
description = "System stats daemon for nova-shell";
|
||||
mainProgram = "nova-stats";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue