diff --git a/modules/apps/adb/default.nix b/modules/apps/adb/default.nix new file mode 100644 index 0000000..97e0654 --- /dev/null +++ b/modules/apps/adb/default.nix @@ -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"; + }; + }; + + }; +} diff --git a/modules/apps/default.nix b/modules/apps/default.nix index 1717cbc..77fe454 100644 --- a/modules/apps/default.nix +++ b/modules/apps/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./adb ./atuin ./coolercontrol ./direnv diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 3a8f0aa..4ba0070 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -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; diff --git a/todo b/todo index eb87836..16f70db 100644 --- a/todo +++ b/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 diff --git a/users/ryan/default.nix b/users/ryan/default.nix index f9f8ad7..c369900 100644 --- a/users/ryan/default.nix +++ b/users/ryan/default.nix @@ -24,7 +24,6 @@ in initialPassword = "'"; isNormalUser = true; extraGroups = [ - "adbusers" "audio" "input" "networkmanager"