From 50015511a88c1389cd6e590bb024c717c41a966f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 24 Sep 2024 11:19:54 +0200 Subject: [PATCH] Add android studio --- hosts/voyager/default.nix | 10 ++++++++-- options/device/roles.nix | 10 ++++++++++ system/roles/default.nix | 1 + system/roles/uni/android.nix | 13 +++++++++++++ system/roles/uni/default.nix | 5 +++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 system/roles/uni/android.nix create mode 100644 system/roles/uni/default.nix diff --git a/hosts/voyager/default.nix b/hosts/voyager/default.nix index 29a64d0..10f6cf0 100644 --- a/hosts/voyager/default.nix +++ b/hosts/voyager/default.nix @@ -98,6 +98,11 @@ ".local/share/cargo" ".local/share/go" ".config/rye" + + # University crap + "Android/Sdk" + "AndroidStudioProjects" + ".android" ]; extraFiles = [ ".config/gtk-3.0/bookmarks" @@ -141,6 +146,7 @@ roles = { type = "laptop"; virtual-machine = false; + isUniMachine = true; }; cpu.type = "amd"; gpu.type = "amd"; @@ -182,10 +188,10 @@ "eDP-1, 1920x1200@60, 0x1080, 1" # HDMI-A-1 above primary - "HDMI-A-1, 1920x1080@60, 0x0, 1" + #"HDMI-A-1, 1920x1080@60, 0x0, 1" # HDMI-A-1 left to primary - #"HDMI-A-1, 1920x1080@60, 1920x1080, 1" + "HDMI-A-1, 1920x1080@60, 1920x1080, 1" # Mirror the primary (laptop) monitor on externals ", preferred, auto, 1, mirror, eDP-1" diff --git a/options/device/roles.nix b/options/device/roles.nix index 9554a7e..992c54c 100644 --- a/options/device/roles.nix +++ b/options/device/roles.nix @@ -35,5 +35,15 @@ in { Workstation machines are meant for regular day-to-day use. ''; }; + + isUniMachine = mkOption { + type = lib.types.bool; + default = false; + description = '' + Should University specific configuration be applied? + + (Things like University specific software, etc.) + ''; + }; }; } diff --git a/system/roles/default.nix b/system/roles/default.nix index ff4a9a6..3b6c8c2 100644 --- a/system/roles/default.nix +++ b/system/roles/default.nix @@ -7,5 +7,6 @@ imports = [ ./workstation ./laptop + ./uni ]; } diff --git a/system/roles/uni/android.nix b/system/roles/uni/android.nix new file mode 100644 index 0000000..9dfb60e --- /dev/null +++ b/system/roles/uni/android.nix @@ -0,0 +1,13 @@ +{ + pkgs, + lib, + config, + ... +}: let + inherit (lib) mkIf; + inherit (config.myOptions.device.roles) isUniMachine; +in { + config = mkIf isUniMachine { + environment.systemPackages = [pkgs.android-studio]; + }; +} diff --git a/system/roles/uni/default.nix b/system/roles/uni/default.nix new file mode 100644 index 0000000..53d5141 --- /dev/null +++ b/system/roles/uni/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./android.nix + ]; +}