diff --git a/sys/modules/android.nix b/sys/modules/android.nix new file mode 100644 index 0000000..57c1964 --- /dev/null +++ b/sys/modules/android.nix @@ -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 + ]; + }; +} diff --git a/sys/modules/default.nix b/sys/modules/default.nix index 32dae85..512b392 100644 --- a/sys/modules/default.nix +++ b/sys/modules/default.nix @@ -10,5 +10,6 @@ ./audio.nix ./graphics.nix ./virtualisation.nix + ./android.nix ]; } diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 90f6a35..3d36e3b 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -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 - ]; }