install steam using brew on macos

This commit is contained in:
2026-09-06 01:40:40 +02:00
parent 129b9ae365
commit 9bccabf712
2 changed files with 19 additions and 3 deletions
+15 -1
View File
@@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }:
{
let
brewPath = config.homebrew.brewPath;
in {
options.lumpiastyHome.brew = lib.mkEnableOption "Homebrew integration via home-manager-brew";
config = lib.mkMerge [
@@ -15,6 +17,18 @@
"steam"
];
};
home.activation.homebrewInstall = lib.mkForce (
lib.hm.dag.entryAfter ["installPackages" "linkGeneration" "createGpgHomedir"] (
if config.homebrew.brewInstall then ''
if [ ! -f "${brewPath}" ]; then
echo "Homebrew not found (${brewPath}), installing..."
export PATH="${pkgs.curl}/bin:${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin:$PATH"
${pkgs.bash}/bin/bash -c "$(${pkgs.curl}/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
'' else ""
)
);
})
(lib.mkIf (!config.lumpiastyHome.brew) {
homebrew.enable = lib.mkForce false;