install steam using brew on macos
This commit is contained in:
+4
-2
@@ -3,8 +3,10 @@ self: { pkgs, ... }: {
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages =
|
||||
[ pkgs.vim
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
curl
|
||||
git
|
||||
];
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
|
||||
+15
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user