From 36a5aa66e8e837f10ba67f1ee1e31e7a07645722 Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Tue, 17 Sep 2024 17:32:27 -0700 Subject: [PATCH] Added android-studio module --- flake.nix | 1 + .../nixos/programs/android-studio/default.nix | 21 +++++++++++++++++++ systems/x86_64-linux/gospel/default.nix | 2 -- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 modules/nixos/programs/android-studio/default.nix diff --git a/flake.nix b/flake.nix index 92d1e1c..21ec927 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ # overlay-package-namespace = "aa"; snowfall.namespace = "aa"; + channels-config.android_sdk.accept_license = true; channels-config.allowUnfree = true; systems.modules.nixos = with inputs; [ diff --git a/modules/nixos/programs/android-studio/default.nix b/modules/nixos/programs/android-studio/default.nix new file mode 100644 index 0000000..599ab9d --- /dev/null +++ b/modules/nixos/programs/android-studio/default.nix @@ -0,0 +1,21 @@ +{ + config, + pkgs, + lib, + namespace, + ... +}: let + cfg = config.${namespace}.programs.android-studio; +in { + options.${namespace}.programs.android-studio = { + enable = lib.mkEnableOption "Android Studio"; + }; + + config = lib.mkIf cfg.enable { + ${namespace}.user.extraGroups = ["kvm"]; + + programs.adb.enable = true; + + environment.systemPackages = [pkgs.android-studio]; + }; +} diff --git a/systems/x86_64-linux/gospel/default.nix b/systems/x86_64-linux/gospel/default.nix index 099d3a9..edf0353 100644 --- a/systems/x86_64-linux/gospel/default.nix +++ b/systems/x86_64-linux/gospel/default.nix @@ -72,8 +72,6 @@ system.monitoring.enable = true; }; - programs.adb.enable = true; - virtualisation = { libvirtd.enable = true;