summaryrefslogtreecommitdiff
path: root/modules/nixos/android.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-12-17 16:39:09 +0300
committerAzat Bahawi <azat@bahawi.net>2022-12-17 16:39:09 +0300
commit8f137c28230623259a964484adcf31fe00756594 (patch)
tree82bce6a13fda125087cf6d9dc80aa91d9230d6c4 /modules/nixos/android.nix
parent3229e56e0d3620ddc735edcfbbefb167efa3b23f (diff)
2022-12-17
Diffstat (limited to 'modules/nixos/android.nix')
-rw-r--r--modules/nixos/android.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/nixos/android.nix b/modules/nixos/android.nix
new file mode 100644
index 0000000..307490a
--- /dev/null
+++ b/modules/nixos/android.nix
@@ -0,0 +1,18 @@
+{
+ config,
+ lib,
+ inputs,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.nixfiles.modules.android;
+in {
+ options.nixfiles.modules.android.enable = mkEnableOption "support for Android devices";
+
+ config = mkIf cfg.enable {
+ programs.adb.enable = true;
+
+ my.extraGroups = ["adbusers"];
+ };
+}