-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
194 lines (168 loc) · 5.8 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
{
description = "Pakihöhle <3";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs";
};
musnix = {
url = "github:musnix/musnix";
};
conduwuit = {
url = "github:girlbossceo/conduwuit";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
private-settings.url = "git+ssh://[email protected]/charludo/nix-private";
personal-site.url = "git+ssh://[email protected]/charludo/personal-site";
blog-site.url = "git+ssh://[email protected]/charludo/barely-website";
eso-reshade.url = "git+ssh://[email protected]/charludo/eso-reshade";
idagio.url = "git+ssh://[email protected]/charludo/IDAGIO-Downloader-Rust-ver";
};
outputs =
{
self,
nixpkgs,
home-manager,
jovian,
private-settings,
musnix,
...
}@inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
private-settings-module = {
config = {
_module.args.private-settings = private-settings;
_module.args.secrets = private-settings.secrets;
};
};
in
{
inherit lib;
nixosModules =
(import ./modules/nixos)
// jovian.outputs.nixosModules
// musnix.nixosModules
// private-settings-module;
homeModules = (import ./modules/home-manager) // private-settings-module;
overlays = import ./overlays { inherit inputs outputs; };
# Available through 'nixos-rebuild --flake .#hostname'
nixosConfigurations =
{
# Desktop
hub = lib.nixosSystem {
modules = [ ./hosts/hub ];
specialArgs = { inherit inputs outputs; };
};
# Laptop
drone = lib.nixosSystem {
modules = [ ./hosts/drone ];
specialArgs = { inherit inputs outputs; };
};
# Laptop Mallorca
mallorca = lib.nixosSystem {
modules = [ ./hosts/mallorca ];
specialArgs = { inherit inputs outputs; };
};
# Gaming
excession = lib.nixosSystem {
modules = [ ./hosts/excession ];
specialArgs = { inherit inputs outputs; };
};
# Gaming Mk II
steamdeck = lib.nixosSystem {
modules = [ ./hosts/steamdeck ];
specialArgs = { inherit inputs outputs; };
};
# nixos-rebuild switch --flake ".#gsv" --target-host gsv
gsv = lib.nixosSystem {
modules = [ ./hosts/gsv ];
specialArgs = { inherit inputs outputs; };
};
}
//
# VMs
builtins.listToAttrs (
builtins.map
(name: {
inherit name;
value = lib.nixosSystem {
modules = [ ./vms/${name}.nix ];
specialArgs = { inherit inputs outputs; };
};
})
(
builtins.filter (name: builtins.substring 0 3 name == "SRV" || builtins.substring 0 2 name == "CL")
(
builtins.map builtins.head (
builtins.map (lib.splitString ".") (builtins.attrNames (builtins.readDir ./vms))
)
)
)
);
# Available through 'home-manager --flake .#username@hostname'
homeConfigurations = {
"charlotte@hub" = lib.homeManagerConfiguration {
modules = [ ./users/charlotte/home/hub.nix ];
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs; };
};
"charlotte@drone" = lib.homeManagerConfiguration {
modules = [ ./users/charlotte/home/drone.nix ];
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs; };
};
"charlotte@excession" = lib.homeManagerConfiguration {
modules = [ ./users/charlotte/home/excession.nix ];
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs; };
};
"charlotte@mallorca" = lib.homeManagerConfiguration {
modules = [ ./users/charlotte/home/mallorca.nix ];
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs; };
};
};
# Available through 'nix develop ".#shellname"'
devShells.${system} = {
keyctl = (import ./shells/keyctl { inherit pkgs; });
vmctl = (import ./shells/vmctl { inherit pkgs; });
remux = (import ./shells/remux { inherit pkgs lib; });
default = (import ./shells { inherit pkgs; });
};
formatter.${system} = pkgs.treefmt;
};
}