-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
175 lines (160 loc) · 5 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
description = "tmmy's NixOS/home-manager configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
#nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
#url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/master";
inputs.nixpkgs.follows = "nixpkgs";
};
#nixpkgs-wayland = {
# url = "github:nix-community/nixpkgs-wayland";
# inputs.nixpkgs.follows = "nixpkgs";
#};
#secrets = {
# url = "";
# inputs.nixpkgs.follows = "nixpkgs";
#};
#flake-parts = {
# url = "github:hercules-ci/flake-parts";
# inputs.nixpkgs.follows = "nixpkgs";
#};
#nixvim = {
# url = "github:nix-community/nixvim";
# inputs.nixpkgs.follows = "nixpkgs";
#};
polymc = {
url = "github:PolyMC/PolyMC";
inputs.nixpkgs.follows = "nixpkgs";
};
# rust packages
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
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-aerospace = {
url = "github:nikitabobko/homebrew-tap";
flake = false;
};
};
outputs = { self, nixpkgs, nix-darwin, home-manager, nix-homebrew, ... } @ inputs: let
inherit (self) outputs;
in
{
nixosConfigurations = {
tmmy-yoga = let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowUnfreePrediate = _: true;
};
overlays = [
inputs.polymc.overlay
inputs.fenix.overlays.default
];
};
in nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = inputs // { pkgs = pkgs; };
modules = [
./nixos/tmmy-yoga/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.users.tmmy = import ./home/users/tmmy/tmmy-yoga.nix;
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
};
darwinConfigurations = {
tmmy-mbp = let
system = "aarch64-darwin";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowUnfreePrediate = _: true;
};
overlays = [
inputs.fenix.overlays.default
];
};
in nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = inputs // { pkgs = pkgs; };
modules = [
nix-homebrew.darwinModules.nix-homebrew {
nix-homebrew = {
# Install Homebrew under the default prefix
enable = true;
# Apple Silicon only
#enableRosetta = true;
# User owning the Homebrew prefix
user = "tmmy";
# Declaartive tap mamagement
taps = {
"homebrew/homebrew-core" = inputs.homebrew-core;
"homebrew/homebrew-cask" = inputs.homebrew-cask;
"homebrew/homebrew-bundle" = inputs.homebrew-bundle;
"homebrew/homebrew-aerospace" = inputs.homebrew-aerospace;
};
# With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`
mutableTaps = false;
# Automatically migrate existing Homebrew installations
#autoMigrate = true;
};
}
./darwin/tmmy-mbp/configuration.nix
home-manager.darwinModules.home-manager {
home-manager.users.tmmy = import ./home/users/tmmy/tmmy-mbp.nix;
home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
# Expose the package set, including overlays, for convenience.
#darwinPackages = self.darwinConfigurations."tmmy-mbp".pkgs;
};
homeConfigurations = {
"thomasstahl@imar123" = let
system = "x86_64-linux";
in home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/users/thomasstahl/thomasstahl-imar123.nix
];
};
};
};
}