-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
202 lines (196 loc) · 6.06 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
impermanence.url = "github:nix-community/impermanence";
mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
berberman = {
url = "github:berberman/flakes";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system};
in
{
nix.registry.nixpkgs.flake = nixpkgs;
devShells.default = pkgs.mkShell {
buildInputs = [];
};
}
)
// {
templates = {
rust = {
path = ./templates/rust;
description = "A simple Rust project";
welcomeText = ''
# Simple Rust Template
'';
};
racket = {
path = ./templates/racket;
description = "A simple Racket project";
welcomeText = ''
# Simple Racket Template
'';
};
cpp = {
path = ./templates/cpp;
description = "A simple C++ project";
welcomeText = ''
# Simple C++ Template
'';
};
python = {
path = ./templates/python;
description = "A simple Python project";
welcomeText = ''
# Simple Python Template
'';
};
coq = {
path = ./templates/coq;
description = "A simple Coq project";
welcomeText = ''
# Simple Coq Template
'';
};
node = {
path = ./templates/node;
description = "A simple NodeJS project";
welcomeText = ''
# Simple NodeJS Template
'';
};
basic = {
path = ./templates/basic;
description = "A simple project";
welcomeText = ''
# Simple Template
'';
};
};
nixosConfigurations = {
natsel = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/natsel/configuration.nix
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
(import ./overlays/static/overlay.nix)
(import ./overlays/misc.nix)
];
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry.p.flake = self;
nix.registry.pkgs.flake = nixpkgs;
nix.registry.nixpkgs.flake = nixpkgs;
}
];
specialArgs = { inherit nixpkgs inputs; };
};
bluespace = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/bluespace/configuration.nix
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
inputs.mailserver.nixosModules.mailserver
{
nixpkgs.overlays = [
(import ./overlays/static/overlay.nix)
(import ./overlays/misc.nix)
];
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry.p.flake = self;
nix.registry.pkgs.flake = nixpkgs;
nix.registry.nixpkgs.flake = nixpkgs;
}
];
specialArgs = { inherit nixpkgs inputs; };
};
sunny = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/sunny/configuration.nix
inputs.home-manager.nixosModules.home-manager
{
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry.p.flake = self;
nix.registry.pkgs.flake = nixpkgs;
nix.registry.nixpkgs.flake = nixpkgs;
}
];
specialArgs = { inherit nixpkgs inputs; };
};
vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/vm/configuration.nix
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
inputs.nixpkgs-wayland.overlay
inputs.rust-overlay.overlays.default
(import ./overlays/misc.nix)
];
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry.p.flake = self;
nix.registry.pkgs.flake = nixpkgs;
nix.registry.nixpkgs.flake = nixpkgs;
}
];
specialArgs = { inherit nixpkgs inputs; };
};
tardis = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/tardis/configuration.nix
inputs.impermanence.nixosModules.impermanence
inputs.nix-index-database.nixosModules.nix-index
# optional to also wrap and install comma
{ programs.nix-index-database.comma.enable = true;
programs.command-not-found.enable = false;
}
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
# inputs.nixpkgs-wayland.overlay
inputs.berberman.overlays.default
(import ./overlays/misc.nix)
# (import ./overlays/sway/overlay.nix)
# (import ./overlays/cgproxy/overlay.nix)
(import ./overlays/kde/overlay.nix)
# (import ./overlays/tree-sitter/gen-overlay.nix nixpkgs)
];
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry.p.flake = self;
# for compatibility.
nix.registry.pkgs.flake = nixpkgs;
nix.registry.nixpkgs.flake = nixpkgs;
}
];
specialArgs = { inherit nixpkgs inputs; };
};
};
};
}