diff --git a/CHANGELOG.md b/CHANGELOG.md index ab21968..6acda18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Added `android` module for using `adb` and `scrcpy` - Changed `nixos` to be `true` by default for Linux hosts - Refactored `if x then y else { }` into `optionalAttrs x y` - Refactored `hasSuffix "{darwin,linux}"` into `pkgs.stdenv.hostPlatform.is{Darwin,Linux}` diff --git a/flake.nix b/flake.nix index cf8fbb7..a258494 100644 --- a/flake.nix +++ b/flake.nix @@ -301,8 +301,8 @@ system = "x86_64-linux"; modules = builtins.attrNames { inherit (modules) - bluetooth deluge nextcloud personal printers samba scanners sway - wireless virt-manager; + android bluetooth deluge nextcloud personal printers samba scanners + sway wireless virt-manager; }; } { diff --git a/modules/android.nix b/modules/android.nix new file mode 100644 index 0000000..1309417 --- /dev/null +++ b/modules/android.nix @@ -0,0 +1,11 @@ +{ + nixosModule = { user, ... }: { + programs.adb.enable = true; + + users.users.${user}.extraGroups = [ "adbusers" ]; + }; + + homeModule = { pkgs, ... }: { + home.packages = builtins.attrValues { inherit (pkgs) scrcpy; }; + }; +}