-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
164 lines (144 loc) · 4.63 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
{
description = "NixOS configuration";
inputs = {
agenix = {
url = "github:ryantm/agenix";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
attic = {
url = "github:zhaofengli/attic";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko?ref=00169fe4a6015a88c3799f0bf89689e06a4d4896";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-tapir.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
auto-zones.url = "github:the-computer-club/automous-zones";
lynx.url = "github:the-computer-club/lynx";
homelab.url = "git+http://git.hydrogen.lan/quantumcoded/homelab.git";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; }
({ config, flake-parts-lib, ... }:
let
flakeModules = {
airsonic = import ./flake-parts/airsonic;
ankisyncd = import ./flake-parts/ankisyncd;
deemix = import ./flake-parts/deemix;
firefox = import ./flake-parts/firefox;
hardware = import ./flake-parts/hardware;
home-manager = import ./flake-parts/home-manager;
hosts = import ./flake-parts/hosts;
kiwix = import ./flake-parts/kiwix;
libraries = import ./flake-parts/libraries;
machines = import ./flake-parts/machines;
minecraft = import ./flake-parts/minecraft;
nixos = import ./flake-parts/nixos;
nvidia = import ./flake-parts/nvidia;
overlays = import ./flake-parts/overlays.nix;
packages = import ./flake-parts/packages;
roles = import ./flake-parts/roles;
services = import ./flake-parts/services;
transpose = import ./flake-parts/transpose;
users = import ./flake-parts/users;
wireguard = import ./flake-parts/wireguard;
};
in
{
imports = with flakeModules; [
airsonic
ankisyncd
deemix
firefox
hardware
home-manager
hosts
kiwix
libraries
machines
minecraft
nixos
nvidia
overlays
packages
roles
services
transpose
users
wireguard
inputs.devshell.flakeModule
inputs.lynx.flakeModules.flake-guard
inputs.auto-zones.flakeModules.asluni
];
systems = [ "x86_64-linux" ];
perSystem = { config, inputs', lib, pkgs, ... }: {
devshells.default = {
commands = [
{
help = "run nixpkgs-fmt";
name = "fmt";
command = "nixpkgs-fmt .";
}
{
help = "starts neovim";
name = "nvim";
command = "nix run --refresh github:quantumcoded/neovim";
}
];
env = [
{
name = "LOCAL_KEY";
value = "/etc/nixos/keys/binary-cache-key.pem";
}
];
packages = with pkgs; [
inputs'.agenix.packages.default
attic-client
deploy-rs
git-lfs
];
};
};
flake = {
inherit flakeModules;
deploy.nodes = {
hydrogen = {
hostname = "hydrogen.lan";
profiles.system = {
user = "root";
sshUser = "root";
sshOpts = [ "-T" ];
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos config.flake.nixosConfigurations.hydrogen;
};
};
};
};
});
}