Compare commits
3
Commits
7ed37b3b75
...
93df208274
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93df208274 | ||
|
|
9bccabf712 | ||
|
|
129b9ae365 |
Generated
+21
@@ -256,6 +256,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785271058,
|
||||
"narHash": "sha256-xVisL04Gt6LsGa1cGCLHhTED7iEykgl7krPyzAm2ZQg=",
|
||||
"owner": "koalalorenzo",
|
||||
"repo": "home-manager-brew",
|
||||
"rev": "795f9aed8ddce24b3cae3b75598e6861e7d72d10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "koalalorenzo",
|
||||
"repo": "home-manager-brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
@@ -551,6 +571,7 @@
|
||||
"bun2nix": "bun2nix",
|
||||
"claude-code": "claude-code",
|
||||
"home-manager": "home-manager",
|
||||
"homebrew": "homebrew",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nix-cachyos-kernel": "nix-cachyos-kernel",
|
||||
"nix-darwin": "nix-darwin",
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
url = "github:nix-darwin/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
homebrew = {
|
||||
url = "github:koalalorenzo/home-manager-brew";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixos-hardware, nix-darwin, ... }@inputs:
|
||||
@@ -76,7 +80,7 @@
|
||||
};
|
||||
darwinConfigurations."MacBook-Pro-Macbook" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
((import ./configuration.nix) self)
|
||||
((import ./hosts/macbook.nix) self)
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
@@ -86,8 +90,10 @@
|
||||
imports = [
|
||||
./home-modules
|
||||
./users/user/home.nix
|
||||
inputs.homebrew.homeManagerModules.default
|
||||
];
|
||||
lumpiastyHome.macos = true;
|
||||
lumpiastyHome.brew = true;
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
inputs.claude-code.overlays.default
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
brewPath = config.homebrew.brewPath;
|
||||
in {
|
||||
options.lumpiastyHome.brew = lib.mkEnableOption "Homebrew integration via home-manager-brew";
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.lumpiastyHome.brew {
|
||||
homebrew = {
|
||||
enable = true;
|
||||
brewInstall = true;
|
||||
update = true;
|
||||
upgrade = true;
|
||||
cleanup = true;
|
||||
casks = [
|
||||
"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;
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
./fhsBash.nix
|
||||
./linux.nix
|
||||
./macos.nix
|
||||
./brew.nix
|
||||
] ++ lib.optionals (osConfig.lumpiasty.enablePlasma) [
|
||||
./plasma.nix
|
||||
];
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
self: { pkgs, ... }: {
|
||||
imports = [ ./modules/options.nix ];
|
||||
imports = [ ../modules/options.nix ];
|
||||
|
||||
# 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.
|
||||
Reference in New Issue
Block a user