modularize android support

This commit is contained in:
Fabian Montero 2024-12-02 14:37:46 -06:00
parent ff1b655d3c
commit 33ab479e22
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 20 additions and 4 deletions

18
sys/modules/android.nix Normal file
View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.sys.androidSupport;
in {
options.local.sys.androidSupport = {
enable = mkEnableOption "androidSupport settings";
};
config = mkIf cfg.enable {
services.udev.packages = with pkgs; [
android-udev-rules
];
};
}

View file

@ -10,5 +10,6 @@
./audio.nix
./graphics.nix
./virtualisation.nix
./android.nix
];
}

View file

@ -19,6 +19,7 @@
audio.enable = true;
graphics.enable = true;
virtualisation.enable = true;
androidSupport.enable = true;
};
# Use the systemd-boot EFI boot loader.
@ -53,8 +54,4 @@
};
groups.fabian.gid = 1002;
};
services.udev.packages = [
pkgs.android-udev-rules
];
}