packages: add whph

This commit is contained in:
Kate 2025-07-22 22:53:55 +02:00
parent 57ab783364
commit e8334a04b2
6 changed files with 128 additions and 20 deletions

View file

@ -124,8 +124,6 @@
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
# Support virtualization, thunderbolt, and poking the APCI directly. >.>
boot.kernelModules = [ boot.kernelModules = [
"thunderbolt" "thunderbolt"
]; ];
@ -133,6 +131,25 @@
# Support thunderbolt. # Support thunderbolt.
services.hardware.bolt.enable = true; services.hardware.bolt.enable = true;
# Support bluetooth.
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
settings = {
General = {
# Support A2DP.
Enable = "Source,Sink,Media,Socket";
# Enable experimental featurees, like reading device battery levels.
Experimental = true;
};
};
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72"; device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72";
fsType = "ext4"; fsType = "ext4";

View file

@ -27,6 +27,7 @@ with pkgs;
gnused gnused
gnugrep gnugrep
just just
qrencode
# Backup things. # Backup things.
keepassxc keepassxc

View file

@ -105,6 +105,7 @@ with pkgs;
obsidian obsidian
onboard onboard
supersonic supersonic
deprekages.whph
# Development. # Development.
jetbrains-toolbox jetbrains-toolbox

View file

@ -45,6 +45,7 @@ flake-utils.lib.eachDefaultSystem (
hrvst-cli = callPackage ./hrvst-cli { }; hrvst-cli = callPackage ./hrvst-cli { };
notion-app = callPackage ./notion-app { inherit _7zz; }; notion-app = callPackage ./notion-app { inherit _7zz; };
gfn-electron = callPackage ./geforce-now { }; gfn-electron = callPackage ./geforce-now { };
whph = callPackage ./whph.nix { };
# utilities # utilities
ykush = callPackage ./ykush.nix { }; ykush = callPackage ./ykush.nix { };

View file

@ -7,7 +7,7 @@
asar, asar,
writeScriptBin, writeScriptBin,
bash, bash,
libgcc libgcc,
}: }:
let let
better-sqlite3-version = "11.4.0"; better-sqlite3-version = "11.4.0";

88
packages/whph.nix Normal file
View file

@ -0,0 +1,88 @@
{
lib,
stdenv,
fetchzip,
autoPatchelfHook,
xorg,
gtk3,
zlib,
pango,
cairo,
harfbuzz,
at-spi2-atk,
gdk-pixbuf,
glib,
gst_all_1,
libayatana-appindicator,
}:
let
this = stdenv.mkDerivation {
pname = "whph";
version = "0.10.1";
src = fetchzip {
url = "https://github.com/ahmet-cetinkaya/whph/releases/download/v${this.version}/whph-v${this.version}-linux.tar.gz";
hash = "sha256-RnxeqZBS7U65Dz0gc/uMDMnWU3tDN/Jx3Czs1gn0rJk=";
stripRoot = false;
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
xorg.libSM
xorg.libICE
xorg.libX11
xorg.libXext
gtk3
zlib
pango
cairo
harfbuzz
at-spi2-atk
gdk-pixbuf
glib
gst_all_1.gst-plugins-base
libayatana-appindicator
];
desktopFile = ''
[Desktop Entry]
Version=1.0
Type=Application
Name=WHPH
GenericName=Work Hard Play Hard; Task Manager
Comment=manager for tasks, habits, and screen use in one
Exec=${placeholder "out"}/bin/whph %U
Icon=${placeholder "out"}/opt/${this.pname}/share/icons/hicolor/512x512/apps/whph.png
Categories=Office;ProjectManagement;
MimeType=x-scheme-handler/notion;
StartupNotify=false
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/opt/${this.pname}
cp -r $src/* $out/opt/${this.pname}/
addAutoPatchelfSearchPath ${this.src}/lib/
# Launch wrapper.
echo "#!/bin/sh" >> $out/bin/whph
echo "$out/opt/${this.pname}/whph \$@" >> $out/bin/whph
chmod +x $out/bin/whph
# Application menu entry.
mkdir -p $out/share/applications
echo "$desktopFile" > $out/share/applications/whph.desktop
runHook postInstall
'';
};
in
this