This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
208 lines (196 loc) · 5.81 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
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
{
description = "A flake containing the nixos configurations of most of my personal systems.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
wayland-overlay = {
url = "github:nix-community/nixpkgs-wayland";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-doom-emacs = {
# later revs up to edbe868dd5f8bf447eaffd4cff85167d0771ce0f
# are giving me an issue with an autoloads missing file erorr
url = "github:nix-community/nix-doom-emacs?rev=f1ca1906a5f0ff319cb08d9ab478cf377e327c92";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sli-repo = {
url = "github:sureapp/sli";
flake = false;
};
};
outputs = {
self,
nixpkgs,
emacs-overlay,
home-manager,
nixos-hardware,
nix-doom-emacs,
wayland-overlay,
pre-commit-hooks,
...
} @ inputs: let
overlays = [emacs-overlay.overlay wayland-overlay.overlay];
pkgs = nixpkgs.legacyPackages.x86_64-linux;
helloDotfiles = pkgs.writeShellApplication {
name = "helloDotfiles";
runtimeInputs = [pkgs.coreutils];
text = ''
printf "\n\n"
echo 👋👋 hello from github:averagechris/dotfiles
echo have a nice day 😎
printf "\n\n"
'';
};
thelio-nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs overlays;};
modules = [
./nixpkgs/nixos/thelio
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris.nix
./nixpkgs/nixos/users/chris-focus.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
xps-nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs overlays;};
modules = [
./nixpkgs/nixos/xps
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-focus.nix
./nixpkgs/nixos/users/chris.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
tootsie = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs overlays;};
modules = [
./nixpkgs/nixos/tootsie
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
taz = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs overlays;};
modules = [
./nixpkgs/nixos/taz
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/searx.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
in {
overlays = {
emacs = emacs-overlay.overlay;
wayland = wayland-overlay.overlay;
};
nixosConfigurations = {
inherit
taz
thelio-nixos
tootsie
xps-nixos
;
};
packages.x86_64-linux.default = helloDotfiles;
checks.x86_64-linux = {
thelio-nixos = thelio-nixos.config.system.build.toplevel;
xps-nixos = xps-nixos.config.system.build.toplevel;
tootsie = tootsie.config.system.build.toplevel;
taz = taz.config.system.build.toplevel;
pre-commit = pre-commit-hooks.lib.x86_64-linux.run {
src = ./.;
hooks = {
alejandra.enable = true;
statix.enable = true;
shellcheck.enable = true;
markdown-formatter = {
enable = true;
name = "markdown-formatter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs.python310Packages; "${mdformat}/bin/mdformat";
};
markdown-linter = {
enable = true;
name = "markdown-linter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs; "${mdl}/bin/mdl -g";
};
};
};
};
devShells = {
x86_64-linux.default = pkgs.mkShell {
shellHook =
self.checks.x86_64-linux.pre-commit.shellHook
+ ''
helloDotfiles
'';
buildInputs = with pkgs; [
alejandra
cachix
helloDotfiles
mdl
statix
python310Packages.mdformat
];
};
};
formatter.x86_64-linux = pkgs.alejandra;
};
}