From f242cc9216d65f979a08d15a48a7a8ced3e72a71 Mon Sep 17 00:00:00 2001 From: bruno ebstein Date: Wed, 31 Jul 2024 18:36:18 +0200 Subject: [PATCH 1/2] add brew-nix to add required dependencies --- flake.lock | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++++++-- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 883c9d30cc2..5f55907c1ff 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,48 @@ { "nodes": { + "brew-api": { + "flake": false, + "locked": { + "lastModified": 1732790140, + "narHash": "sha256-ZJJAfRIb9AqiZLuHEYXu32DcSxB8U8RdtiCAdGTWcew=", + "owner": "BatteredBunny", + "repo": "brew-api", + "rev": "7d188bf724a01adcabc4e4b5ce5d8265af7c578c", + "type": "github" + }, + "original": { + "owner": "BatteredBunny", + "repo": "brew-api", + "type": "github" + } + }, + "brew-nix": { + "inputs": { + "brew-api": [ + "brew-api" + ], + "flake-utils": [ + "flake-utils" + ], + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724407874, + "narHash": "sha256-3nw5O0wLkeTeBXJTyY2pZ57JaRtouLva1a6nVx2syLU=", + "owner": "BatteredBunny", + "repo": "brew-nix", + "rev": "d3d3a2666e5330e83b6a64b1eb3e1e9380f6da9b", + "type": "github" + }, + "original": { + "owner": "BatteredBunny", + "repo": "brew-nix", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -18,6 +61,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "brew-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722500642, + "narHash": "sha256-Vls0TQRdplex1JslnBxEk3M26Q1vR+OSg+sk5rBG4DA=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "b47af8628624856ad6853168298f1f96364d92d6", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1725910328, @@ -36,6 +100,8 @@ }, "root": { "inputs": { + "brew-api": "brew-api", + "brew-nix": "brew-nix", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index cc50ebf22b0..ff45028cb0f 100644 --- a/flake.nix +++ b/flake.nix @@ -2,20 +2,39 @@ inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.brew-api.url = "github:BatteredBunny/brew-api"; + inputs.brew-api.flake = false; + inputs.brew-nix.url = "github:BatteredBunny/brew-nix"; + inputs.brew-nix.inputs.brew-api.follows = "brew-api"; + inputs.brew-nix.inputs.nixpkgs.follows = "nixpkgs"; + inputs.brew-nix.inputs.flake-utils.follows = "flake-utils"; + outputs = { self , nixpkgs , flake-utils + , brew-nix + , ... }: flake-utils.lib.eachDefaultSystem (system: { devShell = let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [ + brew-nix.overlays.default + ]; + }; + inherit (pkgs) lib; in pkgs.mkShellNoCC { packages = [ pkgs.devbox - ]; + ] + ++ + (lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ + pkgs.brewCasks.firefox + ]); }; }); } From 1614c3d0acba2c6ae9a0621997a0528812e8e80c Mon Sep 17 00:00:00 2001 From: bebstein-pass <95220086+bebstein-pass@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:23:12 +0100 Subject: [PATCH 2/2] install Android Studio --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index ff45028cb0f..746bd2bb9ac 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,7 @@ let pkgs = import nixpkgs { inherit system; + config.allowUnfree = true; overlays = [ brew-nix.overlays.default ]; @@ -33,6 +34,7 @@ ] ++ (lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ + pkgs.brewCasks.android-studio pkgs.brewCasks.firefox ]); };