-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
200 lines (166 loc) · 6.47 KB
/
flake.nix
File metadata and controls
200 lines (166 loc) · 6.47 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
description = "starter nixos config flake";
inputs = {
# https://github.com/tgirlcloud/lix-diff/issues/1
nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
systems.url = "github:nix-systems/default";
nixos-hardware.url = "github:NixOS/nixos-hardware";
colmena.url = "github:zhaofengli/colmena";
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
mac-app-util.url = "github:hraban/mac-app-util/link-contents"; # TODO: check this branch
apple-emoji.url = "github:samuelngs/apple-emoji-linux";
treefmt-nix.url = "github:numtide/treefmt-nix";
lix.url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
lix.flake = false;
lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
lix-module.inputs.lix.follows = "lix";
lix-module.inputs.nixpkgs.follows = "nixpkgs";
fum.url = "git+https://codeberg.org/fumnanya/flakes";
fum.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:nix-darwin/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.systems.follows = "systems";
catppuccin.url = "github:catppuccin/nix";
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
distro-grub-themes.url = "github:AdisonCavani/distro-grub-themes";
distro-grub-themes.inputs.nixpkgs.follows = "nixpkgs";
distro-grub-themes.inputs.flake-utils.follows = "flake-utils";
firefox-nightly.url = "github:nix-community/flake-firefox-nightly";
firefox-nightly.inputs.nixpkgs.follows = "nixpkgs";
firefox-nightly.inputs.lib-aggregate.inputs.flake-utils.follows = "flake-utils";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
spicetify-nix.inputs.systems.follows = "systems";
# homebrew casks
homebrew-core.url = "github:homebrew/homebrew-core";
homebrew-core.flake = false;
homebrew-cask.url = "github:homebrew/homebrew-cask";
homebrew-cask.flake = false;
homebrew-kde.url = "github:KDE/homebrew-kde";
homebrew-kde.flake = false;
};
outputs =
{
self,
nixpkgs,
home-manager,
catppuccin,
treefmt-nix,
systems,
distro-grub-themes,
nixos-hardware,
lix-module,
spicetify-nix,
nix-darwin,
mac-app-util,
nix-homebrew,
colmena,
...
}@inputs:
let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
treefmtConfig = import ./treefmt.nix;
in
{
# for `nix fmt`
formatter = eachSystem (pkgs: treefmt-nix.lib.mkWrapper pkgs treefmtConfig);
# for `nix flake check`
checks = eachSystem (pkgs: {
formatting = (treefmt-nix.lib.evalModule pkgs treefmtConfig).config.build.check self;
});
darwinConfigurations.lumi = nix-darwin.lib.darwinSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/lumi/configuration.nix
lix-module.darwinModules.default
mac-app-util.darwinModules.default
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
mac-app-util.homeManagerModules.default
catppuccin.homeModules.catppuccin
spicetify-nix.homeManagerModules.spicetify
];
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.fum = ./hosts/lumi/home.nix;
}
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
# Install Homebrew under the default prefix
enable = true;
# Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2
enableRosetta = true;
# User owning the Homebrew prefix
user = "fum";
# Optional: Declarative tap management
taps = {
"homebrew/homebrew-core" = inputs.homebrew-core;
"homebrew/homebrew-cask" = inputs.homebrew-cask;
"KDE/homebrew-kde" = inputs.homebrew-kde;
};
# Optional: Enable fully-declarative tap management
#
# With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`.
mutableTaps = false;
};
}
];
};
nixosConfigurations.antikythera = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/antikythera/configuration.nix
distro-grub-themes.nixosModules."x86_64-linux".default
nixos-hardware.nixosModules.lenovo-thinkpad-t480s
lix-module.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
catppuccin.homeModules.catppuccin
spicetify-nix.homeManagerModules.spicetify
];
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.fumnanya = ./hosts/antikythera/home.nix;
}
];
};
colmenaHive = colmena.lib.makeHive {
meta = {
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
specialArgs = {
inherit nixpkgs inputs;
};
};
bastion = {
deployment = {
targetHost = "bastion";
targetUser = "colmena";
buildOnTarget = true;
};
imports = [
./hosts/bastion/configuration.nix
catppuccin.nixosModules.catppuccin
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
catppuccin.homeModules.catppuccin
spicetify-nix.homeManagerModules.spicetify
];
home-manager.extraSpecialArgs = { inherit nixpkgs inputs; };
home-manager.users.fumnanya = ./hosts/bastion/home.nix;
}
];
};
};
};
}