-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·107 lines (101 loc) · 3.01 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
description = "Seth's Zen Nix Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin/nix-darwin-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
mac-app-util.url = "github:hraban/mac-app-util";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
homebrew-emacs-plus = {
url = "github:d12frosted/homebrew-emacs-plus";
flake = false;
};
};
outputs =
inputs@{
self,
nix-darwin,
nixpkgs,
home-manager,
nix-homebrew,
mac-app-util,
homebrew-core,
homebrew-cask,
homebrew-bundle,
homebrew-emacs-plus,
}:
let
system = "aarch64-darwin";
machineName = "sgoodluck-m1air";
# Import the personal configuration
personalConfig = import ./personal.nix {
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
};
in
{
darwinConfigurations.${machineName} = nix-darwin.lib.darwinSystem {
inherit system;
modules = [
./darwin
mac-app-util.darwinModules.default
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
enable = true;
enableRosetta = true;
user = personalConfig.personal.username;
mutableTaps = false;
autoMigrate = true;
taps = {
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-bundle" = homebrew-bundle;
"homebrew/homebrew-cask" = homebrew-cask;
"d12frosted/homebrew-emacs-plus" = homebrew-emacs-plus;
};
};
}
{
# Make personal config available to all modules
_module.args.personal = personalConfig;
users.users.${personalConfig.personal.username}.home = "/Users/${personalConfig.personal.username}";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${personalConfig.personal.username} =
{ pkgs, ... }:
import ./home.nix {
inherit pkgs;
lib = nixpkgs.lib;
personal = personalConfig;
config = { };
};
# Make personal config available to home-manager modules
extraSpecialArgs = {
personal = personalConfig;
};
};
}
home-manager.darwinModules.home-manager
];
};
};
}