cpugov, sink-switcher and nightlight were referenced solely by the waybar config; the Quickshell popouts cover all three. btnote, capsnote, vpn and waybar-hidpp are unreferenced anywhere. Adds the two system units for battery threshold restore and camera shutoff, which had been missed.
40 lines
1.3 KiB
Nix
40 lines
1.3 KiB
Nix
# ABOUTME: Helper scripts for battery conservation and camera control.
|
|
# ABOUTME: Installs the subset of moonarch/defaults/bin that is still called.
|
|
|
|
{ lib, stdenvNoCC, src }:
|
|
|
|
let
|
|
# Only the scripts something still calls. The rest of defaults/bin is either
|
|
# referenced solely by the waybar config, which this setup does not use
|
|
# (cpugov, sink-switcher, nightlight — all three covered by Quickshell
|
|
# popouts), or unreferenced anywhere (btnote, capsnote, vpn, waybar-hidpp).
|
|
scripts = [
|
|
"moonarch-batsaver-apply" # called by -toggle
|
|
"moonarch-batsaver-restore" # called by moonarch-batsaver.service
|
|
"moonarch-batsaver-toggle" # called by BatteryPopout.qml
|
|
"moonarch-camera-apply" # called by -toggle
|
|
"moonarch-camera-boot" # called by moonarch-camera.service
|
|
"moonarch-camera-list" # called by CameraService.qml
|
|
"moonarch-camera-toggle" # called by CameraService.qml
|
|
];
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "moonarch-scripts";
|
|
version = "0-unstable";
|
|
inherit src;
|
|
|
|
dontBuild = true;
|
|
dontConfigure = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 ${lib.concatMapStringsSep " " (s: "defaults/bin/${s}") scripts} -t "$out/bin/"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Moonarch helper scripts for battery and camera control";
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|