Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
43bfbda
linux-rust: implement basic connections
kavishdevar Oct 20, 2025
cf2a242
linux-rust: add tray icon
kavishdevar Oct 21, 2025
c0ae061
linux-rust: remove percent character from tray
kavishdevar Oct 21, 2025
b0561e9
linux-rust: add conversational awareness
kavishdevar Oct 21, 2025
0f04290
linux-rust: fix conv-detect toggle in tray menu
kavishdevar Oct 21, 2025
ae5a701
linux-rust: fix battery parsing
kavishdevar Oct 21, 2025
7dd029f
linux-rust: add att
kavishdevar Oct 22, 2025
9da4c93
linux-rust: add tipi
kavishdevar Oct 22, 2025
221680f
linux-rust: remove ATT temporarily
kavishdevar Oct 22, 2025
e5c2419
linux-rust: optimize for size and add cli options
kavishdevar Oct 22, 2025
fec2263
linux-rust: catch errors
kavishdevar Oct 22, 2025
99940b9
linux-rust: add font
kavishdevar Oct 23, 2025
ccee820
linux-rust: store irk and enc keys
kavishdevar Oct 23, 2025
925c930
linux-rust: add ble skeleton
kavishdevar Oct 23, 2025
b474698
linux-rust: parse encrypted ble info
kavishdevar Oct 23, 2025
a007d9c
linux-rust: parse encrypted ble info
kavishdevar Oct 23, 2025
26cee5c
linux-rust: show battery info from LE in tray
kavishdevar Oct 23, 2025
3a0cc2e
linux-rust: remove sampling period from LE scanner
kavishdevar Oct 27, 2025
51b3d46
linux-rust: fix conv-detect and add le auto-connect
kavishdevar Oct 28, 2025
320964e
linux-rust: add dummy UI
kavishdevar Oct 28, 2025
17b5454
linux-rust: fix conv detect
kavishdevar Oct 28, 2025
99beeb5
linux-rust: add `--start-minimized`
kavishdevar Oct 28, 2025
c5a824c
linux-rust: remove unused features from iced
kavishdevar Oct 28, 2025
fa8bc11
linux-rust: parse and store device info
kavishdevar Oct 28, 2025
64470c4
linux-rust: show device info in UI
kavishdevar Nov 3, 2025
934df24
linux-rust: add bt communication to ui
kavishdevar Nov 5, 2025
a2cda68
linux-rust: add skeleton for other devices
kavishdevar Nov 6, 2025
bf6630d
linux-rust: implement bluetooth logic with ui
kavishdevar Nov 7, 2025
3853e8e
linux-rust: add listening mode picker for airpods
kavishdevar Nov 8, 2025
381b097
linux-rust: try enabling adaptive volume
kavishdevar Nov 8, 2025
23cf572
linux-rust: add anc control for nothing device
kavishdevar Nov 9, 2025
2049431
linux-rust: parse encrypted ble info
kavishdevar Oct 23, 2025
b7cd80e
linux-rust: cargo update
kavishdevar Nov 10, 2025
9f7f434
linux-rust: decrease icon size to 256x256
kavishdevar Nov 10, 2025
9d10eed
linux-rust: add desktop file
kavishdevar Nov 10, 2025
29c4225
linux-rust: add just file to build appimage
kavishdevar Nov 10, 2025
47f0213
linux-rust: add metainfo for flatpak
kavishdevar Nov 10, 2025
99e5b71
linux-rust: fix source name flatpak manifest
kavishdevar Nov 10, 2025
6585cf6
linux-rust: add session-bus to flatpak manifest for tray
kavishdevar Nov 10, 2025
0c9a2bd
linux-rust: rename binary
kavishdevar Nov 10, 2025
99a689a
linux-rust: update desktop entry to use rDNS icon name
kavishdevar Nov 10, 2025
b1f3856
linux-rust: update justfile for last two files
kavishdevar Nov 10, 2025
253ed65
linux-rust: add gitignore
kavishdevar Nov 10, 2025
a01e167
linux-rust: take version in justfile
kavishdevar Nov 10, 2025
093554d
linux-rust: add v0.1.0 to flatpak manifest
kavishdevar Nov 10, 2025
4737cbf
linux-rust: add battery to window and add option for text in tray
kavishdevar Nov 20, 2025
6f0323e
linux-rust: parse single battery of AirPods Max
kavishdevar Nov 22, 2025
e2d17b8
linux-rust: add nix flake (#371)
SophiaH67 Dec 11, 2025
376c542
feat(nix): add comprehensive Nix flake for linux-rust
doprz Dec 13, 2025
6ded8ff
feat(nix): add comprehensive Nix flake for linux-rust
doprz Dec 13, 2025
902b12a
fix(clippy): fix cargo clippy warnings
doprz Dec 13, 2025
c852b72
fix(linux-rust): format and fix syntax error
doprz Dec 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -659,3 +659,10 @@ obj/

# End of https://www.toptal.com/developers/gitignore/api/qt,c++,clion,kotlin,python,android,pycharm,androidstudio,visualstudiocode,linux
linux/.qmlls.ini

# Nix
result
result-*

# direnv
.direnv
12 changes: 12 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
) { src = ./.; }).defaultNix
143 changes: 143 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

141 changes: 141 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
description = "AirPods liberated from Apple's ecosystem";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
systems.url = "github:nix-systems/default";
treefmt-nix.url = "github:numtide/treefmt-nix";
};

outputs =
inputs@{
self,
crane,
flake-parts,
systems,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
imports = [
inputs.treefmt-nix.flakeModule
];

perSystem =
{
self',
pkgs,
lib,
...
}:
let
buildInputs =
with pkgs;
[
dbus
libpulseaudio
alsa-lib
bluez

# https://github.com/max-privatevoid/iced/blob/master/DEPENDENCIES.md
expat
fontconfig
freetype
freetype.dev
libGL
pkg-config
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
wayland
libxkbcommon
vulkan-loader
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
];

nativeBuildInputs = with pkgs; [
pkg-config
makeWrapper
];

craneLib = crane.mkLib pkgs;
unfilteredRoot = ./linux-rust/.;
src = lib.fileset.toSource {
root = unfilteredRoot;
fileset = lib.fileset.unions [
# Default files from crane (Rust and cargo files)
(craneLib.fileset.commonCargoSources unfilteredRoot)
(lib.fileset.maybeMissing ./linux-rust/assets/font)
];
};

commonArgs = {
inherit buildInputs nativeBuildInputs src;
strictDeps = true;

# RUST_BACKTRACE = "1";
};

librepods = craneLib.buildPackage (
commonArgs
// {
cargoArtifacts = craneLib.buildDepsOnly commonArgs;

doCheck = false;

# Wrap the binary after build to set runtime library path
postInstall = ''
wrapProgram $out/bin/librepods \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
'';

meta = {
description = "AirPods liberated from Apple's ecosystem";
homepage = "https://github.com/kavishdevar/librepods";
license = pkgs.lib.licenses.gpl3Only;
maintainers = [ "kavishdevar" ];
platforms = pkgs.lib.platforms.unix;
mainProgram = "librepods";
};
}
);
in
{
checks = {
inherit librepods;
};

packages.default = librepods;
apps.default = {
type = "app";
program = lib.getExe librepods;
};

devShells.default = craneLib.devShell {
name = "librepods-dev";
checks = self'.checks;

# NOTE: cargo and rustc are provided by default.
buildInputs =
with pkgs;
[
rust-analyzer
]
++ buildInputs;

LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
};

treefmt = {
programs.nixfmt.enable = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.nixfmt-rfc-style.compiler;
programs.nixfmt.package = pkgs.nixfmt-rfc-style;
};
};
};
}
7 changes: 7 additions & 0 deletions linux-rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/*.flatpak
repo
dist
build-dir
vendor
.cargo
.flatpak-builder
Loading