-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
126 lines (123 loc) · 4.02 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
my-modules = {
url = "github:joshleecreates/nix-modules/main";
flake = false;
};
local-modules = {
url = "git+file:../nix-modules";
flake = false;
};
darwin = {
url = "github:LnL7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
# Optional: Declarative tap management
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
homebrew-services = {
url = "github:homebrew/homebrew-services";
flake = false;
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
homebrew-felixkratz = {
url = "github:FelixKratz/homebrew-formulae";
flake = false;
};
homebrew-norwoodj = {
url = "github:norwoodj/homebrew-tap";
flake = false;
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-generators, home-manager, darwin, my-modules, homebrew-services, homebrew-felixkratz, homebrew-norwoodj, homebrew-core, homebrew-cask, homebrew-bundle, ... }@inputs:
let
homebrew-services-patched = nixpkgs.legacyPackages.aarch64-darwin.applyPatches {
name = "homebrew-services-patched";
src = homebrew-services;
patches = [./modules/darwin/homebrew-services.patch];
};
in
{
nixosConfigurations.kasti = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs; inherit self;};
system = "x86_64-linux";
modules = [
./hosts/kasti/configuration.nix
inputs.home-manager.nixosModules.default
];
};
nixosConfigurations.workstation = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs; inherit self;};
system = "x86_64-linux";
modules = [
./hosts/workstation/configuration.nix
inputs.home-manager.nixosModules.default
(nixos-generators.nixosModules.all-formats)
];
};
nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs; inherit self;};
system = "x86_64-linux";
modules = [
./hosts/nixos-desktop/configuration.nix
inputs.home-manager.nixosModules.default
];
};
homeConfigurations."josh@silver" = home-manager.lib.homeManagerConfiguration {
modules = [
./homes/joshlee.nix
];
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
};
homeConfigurations."josh@pop-os" = home-manager.lib.homeManagerConfiguration {
modules = [
./homes/josh.nix
];
pkgs = nixpkgs.legacyPackages."x86_64-linux";
};
darwinConfigurations."sting" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
home-manager.darwinModules.home-manager
inputs.nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
user = "josh";
enable = true;
taps = {
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask;
"homebrew/homebrew-services" = homebrew-services-patched;
"homebrew/homebrew-bundle" = homebrew-bundle;
"felixkratz/homebrew-formulae" = homebrew-felixkratz;
"norwoodj/tap" = homebrew-norwoodj;
};
mutableTaps = true;
autoMigrate = false;
};
}
./hosts/macbook/configuration.nix
];
};
};
}