Skip to content

Commit 1682318

Browse files
committed
✨ (voidling): add homebrew support
1 parent 3e1e98a commit 1682318

3 files changed

Lines changed: 130 additions & 8 deletions

File tree

flake.lock

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
mkDarwinSystem =
4848
{
49+
systemConfig,
4950
userConfigs,
5051
system ? "aarch64-darwin",
5152
lib ? mkLib packages.${system},
@@ -55,14 +56,8 @@
5556
inherit inputs outputs lib;
5657
};
5758
modules = [
58-
{
59-
nixpkgs.hostPlatform = system;
60-
61-
documentation.enable = true;
62-
documentation.man.enable = false;
63-
documentation.doc.enable = false;
64-
65-
}
59+
{ nixpkgs.hostPlatform = system; }
60+
systemConfig
6661
hm.darwinModules.home-manager
6762
{
6863
home-manager.sharedModules = [
@@ -107,6 +102,7 @@
107102
# <-- New section for Darwin systems
108103
"Gwenchlans-MacBook-Pro" = mkDarwinSystem {
109104
userConfigs = ./home/profiles/voidling.nix;
105+
systemConfig = ./hosts/voidling;
110106
};
111107
};
112108

@@ -144,6 +140,18 @@
144140
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
145141
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
146142

143+
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
144+
145+
# Optional: Declarative tap management
146+
homebrew-core = {
147+
url = "github:homebrew/homebrew-core";
148+
flake = false;
149+
};
150+
homebrew-cask = {
151+
url = "github:homebrew/homebrew-cask";
152+
flake = false;
153+
};
154+
147155
# Home-manager
148156
hm.url = "github:nix-community/home-manager";
149157
hm.inputs.nixpkgs.follows = "nixpkgs";

hosts/voidling/default.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{ inputs, ... }:
2+
{
3+
imports = [
4+
inputs.nix-homebrew.darwinModules.nix-homebrew
5+
];
6+
networking.hostName = "voidling"; # Define your hostname.
7+
8+
documentation.enable = true;
9+
documentation.man.enable = false;
10+
documentation.doc.enable = false;
11+
12+
nix-homebrew = {
13+
# Install Homebrew under the default prefix
14+
enable = true;
15+
16+
# Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2
17+
enableRosetta = true;
18+
19+
# User owning the Homebrew prefix
20+
user = "elyth";
21+
22+
autoMigrate = true;
23+
24+
# Optional: Declarative tap management
25+
taps = {
26+
"homebrew/homebrew-core" = inputs.homebrew-core;
27+
"homebrew/homebrew-cask" = inputs.homebrew-cask;
28+
};
29+
30+
# Optional: Enable fully-declarative tap management
31+
#
32+
# With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`.
33+
mutableTaps = false;
34+
};
35+
36+
services.tailscale.enable = true;
37+
38+
homebrew.brews = [
39+
{
40+
name = "font-sf-pro";
41+
args = [ "cask" ];
42+
}
43+
];
44+
}

0 commit comments

Comments
 (0)