-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
167 lines (149 loc) · 4.42 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
{
description = "System flake for my NixOS and home-manager configs";
nixConfig = {
trusted-substituters = [
"https://cache.nixos.org/"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
warn-dirty = false;
};
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Hardware quirks
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# tmux plugin manager
tmux-tpm = {
url = "github:tmux-plugins/tpm/master";
flake = false;
};
# Rosé Pine for Waybar
waybar-rose-pine = {
url = "github:rose-pine/waybar";
flake = false;
};
};
outputs =
{ self
, nixpkgs
, home-manager
, nixos-hardware
, ...
} @ inputs:
let
inherit (self) outputs;
in
{
nixosConfigurations = {
# Build for my desktop.
desktop = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs outputs;
hasUI = true;
hasKDE = true;
hasHyprland = true;
hasGaming = true;
hasBluetooth = false;
};
modules = [
./nixos/desktop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = nixpkgs.lib.mkMerge [
{
inherit inputs outputs;
}
specialArgs
];
home-manager.users.remco.imports = [ ./home-manager/home.nix ];
home-manager.backupFileExtension = "backup";
}
];
};
# Build for my gaming laptop.
laptop = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs outputs;
hasUI = true;
hasKDE = true;
hasHyprland = false;
hasGaming = true;
hasBluetooth = true;
};
modules = [
./nixos/laptop/configuration.nix
nixos-hardware.nixosModules.lenovo-legion-16ach6h-hybrid
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = nixpkgs.lib.mkMerge [
{
inherit inputs outputs;
}
specialArgs
];
home-manager.users.remco.imports = [ ./home-manager/home.nix ];
home-manager.backupFileExtension = "backup";
}
];
};
# Build for my framework laptop.
framework = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs outputs;
hasUI = true;
hasKDE = false;
hasHyprland = true;
hasGaming = false;
hasBluetooth = true;
};
modules = [
./nixos/framework/configuration.nix
# nixos-hardware.nixosModules.framework.amd-7040
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = nixpkgs.lib.mkMerge [
{
inherit inputs outputs;
}
specialArgs
];
home-manager.users.remco.imports = [ ./home-manager/home.nix ];
home-manager.backupFileExtension = "backup";
}
];
};
# Build for my dev vm's
vm = nixpkgs.lib.nixosSystem rec {
specialArgs = {
inherit inputs outputs;
hasUI = false;
hasKDE = false;
hasHyprland = false;
hasGaming = false;
hasBluetooth = false;
};
modules = [
./nixos/vm/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = nixpkgs.lib.mkMerge [
{
inherit inputs outputs;
}
specialArgs
];
home-manager.users.remco.imports = [ ./home-manager/home.nix ];
home-manager.backupFileExtension = "backup";
}
];
};
};
};
}