Add adb and scrcpy

This commit is contained in:
Ryan Pandya 2025-01-25 22:55:30 -08:00
parent 96999a0860
commit 69e1ae3a8c
5 changed files with 50 additions and 2 deletions

View File

@ -0,0 +1,47 @@
{
lib,
config,
pkgs,
username,
...
}:
let
cfg = config.adb;
xdg = config.home-manager.users.${username}.xdg;
in
{
options = {
adb = {
enable = lib.mkEnableOption "Enable adb and scrcpy in NixOS & home-manager";
};
};
config = lib.mkIf cfg.enable {
programs.adb.enable = true;
users.users.${username}.extraGroups = [ "adbusers" ];
environment.systemPackages = [ pkgs.scrcpy ];
home-manager.users.${username}.home.file = {
desktop-entry-adb-connect-shield-tv = {
enable = true;
text = ''
[Desktop Entry]
Exec=adb connect shield-tv.home
Name=adb-connect-shield-tv
Type=Application
'';
target = "${xdg.configHome}/autostart/adb-connect-shield-tv.desktop";
};
desktop-entry-adb-connect-luna = {
enable = true;
text = ''
[Desktop Entry]
Exec=adb connect luna.home
Name=adb-connect-luna
Type=Application
'';
target = "${xdg.configHome}/autostart/adb-connect-luna.desktop";
};
};
};
}

View File

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./adb
./atuin ./atuin
./coolercontrol ./coolercontrol
./direnv ./direnv

View File

@ -35,6 +35,7 @@ in
# Custom modules # Custom modules
base.enable = true; base.enable = true;
catppuccinTheming.enable = true; catppuccinTheming.enable = true;
adb.enable = true;
# floorp.enable = true; # floorp.enable = true;
# kde.enable = true; # kde.enable = true;
# mumble.enable = true; # mumble.enable = true;

2
todo
View File

@ -1,5 +1,5 @@
DONE secrets DONE secrets
DONE syncthing TOFIX syncthing - needs to have different keys per host
DONE Logseq DONE Logseq
DONE mouse speed DONE mouse speed
DONE git thru ssh DONE git thru ssh

View File

@ -24,7 +24,6 @@ in
initialPassword = "'"; initialPassword = "'";
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"adbusers"
"audio" "audio"
"input" "input"
"networkmanager" "networkmanager"