-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
215 lines (194 loc) · 6.52 KB
/
flake.nix
File metadata and controls
215 lines (194 loc) · 6.52 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
{
description = "Eveeifyeve Nix/NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-25.05";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
nix-darwin.url = "github:LnL7/nix-darwin";
niri.url = "github:sodiboo/niri-flake";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
stylix.url = "github:nix-community/stylix/master";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
nixcord.url = "github:kaylorben/nixcord";
eveeifyeve-flake-templates.url = "github:Eveeifyeve/flake-templates";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
deskflow-homebrew-tap = {
url = "github:deskflow/homebrew-tap";
flake = false;
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
compose.url = "github:digitalbrewstudios/nixos-compose";
};
outputs =
inputs@{ self, nixpkgs, ... }:
let
forAllSystems =
f:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system:
f {
pkgs = import nixpkgs { inherit system; };
inherit system;
}
);
in
{
formatter = forAllSystems ({ pkgs, system }: pkgs.nixfmt-rfc-style);
checks = forAllSystems (
{ pkgs, system }:
{
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
};
};
}
);
# NixOS
nixosConfigurations = {
eveeifyeve = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
inputs.disko.nixosModules.disko
inputs.nixvim.nixosModules.nixvim
inputs.agenix.nixosModules.default
inputs.stylix.nixosModules.stylix
inputs.niri.nixosModules.niri
./hosts/eveeifyeve
./modules/vim
./modules/stylix.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {
git = {
username = "eveeifyeve";
email = "88671402+Eveeifyeve@users.noreply.github.com";
};
inherit inputs;
};
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.eveeifyeve = import ./hosts/eveeifyeve/home.nix;
sharedModules = [
inputs.nixcord.homeModules.nixcord
inputs.zen-browser.homeModules.beta
];
};
}
];
};
recovery = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = with pkgs; [
neovim
disko
curl
git
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
networking.hostName = "recovery-iso";
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
}
)
];
};
};
# Nix on Darwin with Nix-Darwin x HM
darwinConfigurations = {
eveeifyeve-macbook = inputs.nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit inputs;
}; # Inputs are needed for homebrew
modules = [
inputs.agenix.darwinModules.default
inputs.nixvim.nixDarwinModules.nixvim
inputs.nix-homebrew.darwinModules.nix-homebrew
inputs.home-manager.darwinModules.home-manager
inputs.stylix.darwinModules.stylix
{
home-manager = {
extraSpecialArgs = {
git = {
username = "eveeifyeve";
email = "88671402+Eveeifyeve@users.noreply.github.com";
};
inherit inputs;
masterPkgs = import inputs.nixpkgs-master {
system = "aarch64-darwin";
};
};
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.eveeifyeve = import ./hosts/eveeifyeve-mac/home.nix;
sharedModules = [
inputs.nixcord.homeModules.nixcord
inputs.zen-browser.homeModules.beta
];
};
}
./hosts/eveeifyeve-mac
./modules/vim
#TODO: wait for pr to come out https://github.com/nix-darwin/nix-darwin/pull/942
#./modules/nix-darwin/nh.nix
./modules/nix-darwin/rice.nix
./modules/stylix.nix
./modules/homebrew.nix
];
};
};
devShells = forAllSystems (
{ pkgs, system }:
{
default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
};
}
);
# Nix Flake Templates for Shell Environments
# https://github.com/Eveeifyeve/flake-templates
templates = inputs.eveeifyeve-flake-templates.templates;
};
}