Add adb and scrcpy
This commit is contained in:
parent
96999a0860
commit
69e1ae3a8c
47
modules/apps/adb/default.nix
Normal file
47
modules/apps/adb/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./adb
|
||||
./atuin
|
||||
./coolercontrol
|
||||
./direnv
|
||||
|
||||
@ -35,6 +35,7 @@ in
|
||||
# Custom modules
|
||||
base.enable = true;
|
||||
catppuccinTheming.enable = true;
|
||||
adb.enable = true;
|
||||
# floorp.enable = true;
|
||||
# kde.enable = true;
|
||||
# mumble.enable = true;
|
||||
|
||||
2
todo
2
todo
@ -1,5 +1,5 @@
|
||||
DONE secrets
|
||||
DONE syncthing
|
||||
TOFIX syncthing - needs to have different keys per host
|
||||
DONE Logseq
|
||||
DONE mouse speed
|
||||
DONE git thru ssh
|
||||
|
||||
@ -24,7 +24,6 @@ in
|
||||
initialPassword = "'";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"adbusers"
|
||||
"audio"
|
||||
"input"
|
||||
"networkmanager"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user