-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
222 lines (186 loc) · 5.21 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
{
description = "NixOS configuration of vyorkin's hosts";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-21-11 = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
ref = "nixos-21.11";
flake = false;
};
# Nix-flakes deployment tool
deploy-rs.url = "github:serokell/deploy-rs";
# Provides a basic system for managing a user environment
# using the Nix package manager together with the Nix
# libraries found in Nixpkgs: https://github.com/rycee/home-manager
home-manager.url = "github:rycee/home-manager";
# NixOS profiles covering hardware quirks:
# https://github.com/NixOS/nixos-hardware
nixos-hardware = {
type = "github";
owner = "NixOS";
repo = "nixos-hardware";
flake = false;
};
# Automated, pre-built packages for Wayland (sway/wlroots)
nixpkgs-wayland = {
url = "github:colemickens/nixpkgs-wayland";
};
# Bleeding edge Emacs
emacs.url = "github:nix-community/emacs-overlay";
# LSB&FHS compatibility for NixOS.
# Intended for containers and VMs.
# https://github.com/balsoft/nixos-fhs-compat
nixos-fhs-compat.url = "github:balsoft/nixos-fhs-compat";
# The Nix User Repository - community-driven meta repository for Nix packages
NUR = {
url = "github:nix-community/NUR";
flake = false;
};
# Modules to help you handle persistent state on systems with ephemeral root storage
impermanence.url = "github:nix-community/impermanence";
# A few Nix expressions suitable for inclusion in Nix User Repository
rycee = {
url = "gitlab:rycee/nur-expressions";
flake = false;
};
# A faster, persistent implementation of direnv's use_nix, to replace the built-in one
nix-direnv = { url = "github:nix-community/nix-direnv"; };
# Official repository for community contributed blocklets
i3blocks-contrib = {
type = "github";
owner = "vivien";
repo = "i3blocks-contrib";
flake = false;
};
# CLI email client
himalaya.url = "github:soywod/himalaya";
nheko = {
url = "github:nheko-reborn/nheko";
flake = false;
};
mtxclient ={
url = "github:nheko-reborn/mtxclient";
flake = false;
};
kitty-themes = {
type = "github";
owner = "dexpota";
repo = "kitty-themes";
flake = false;
};
weechat-scripts = {
type = "github";
owner = "weechat";
repo = "scripts";
flake = false;
};
weechat-notify-send = {
type = "github";
owner = "s3rvac";
repo = "weechat-notify-send";
flake = false;
};
materia-theme = {
type = "github";
owner = "nana-4";
repo = "materia-theme";
flake = false;
};
nix-zsh-completions = {
type = "github";
owner = "spwhitt";
repo = "nix-zsh-completions";
flake = false;
};
ghacks = {
type = "github";
owner = "ghacksuserjs";
repo = "ghacks-user.js";
flake = false;
};
secrets = {
url = "git+ssh://[email protected]/vyorkin/dotsecrets.git";
flake = false;
};
git-config = {
url = "git+ssh://[email protected]/vyorkin/gitconfig.git";
flake = false;
};
zsh-config = {
type = "github";
owner = "vyorkin";
repo = "zshrc";
flake = false;
};
tmux-config = {
type = "github";
owner = "vyorkin";
repo = "tmux.conf";
flake = false;
};
tpm = {
type = "github";
owner = "tmux-plugins";
repo = "tpm";
flake = false;
};
vim-config = {
type = "github";
owner = "vyorkin";
repo = "vimrc";
flake = false;
};
emacs-config = {
type = "github";
owner = "vyorkin";
repo = "emacs.d";
flake = false;
};
dotpryrc = {
type = "github";
owner = "vyorkin";
repo = "dotpryrc";
flake = false;
};
nixos-artwork = {
type = "github";
owner = "nixos";
repo = "artwork";
flake = false;
};
};
outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: {
nixosModules = import ./modules;
nixosProfiles = import ./profiles;
nixosConfigurations = with nixpkgs.lib;
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
mkHost = name:
nixosSystem {
system = removeSuffix "\n" (builtins.readFile (./hosts + "/${name}/system"));
modules = [(import (./hosts + "/${name}"))];
specialArgs = { inherit inputs; };
};
in genAttrs hosts mkHost;
legacyPackages.x86_64-linux =
(builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs;
defaultApp = deploy-rs.defaultApp;
deploy = {
user = "root";
nodes.autism = {
hostname =
self.nixosConfigurations.autism.config.networking.hostName;
profiles.system.path = deploy-rs.x86_64-linux.activate.nixos
self.nixosConfigurations.autism;
};
nodes.notbad = {
hostname =
self.nixosConfigurations.notbad.config.networking.hostName;
profiles.system.path = deploy-rs.x86_64-linux.activate.nixos
self.nixosConfigurations.notbad;
};
};
};
}