-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
128 lines (110 loc) · 3.49 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
{
# _ ___ ______ ____
# / | / (_) __ / ____/___ ____ / __/____
# / |/ / / |/_/ / / / __ \/ __ \/ /_/ ___/
# / /| / /> < / /___/ /_/ / / / / __(__ )
# /_/ |_/_/_/|_| \____/\____/_/ /_/_/ /____/
description = "Kolyma's server configs";
# inputs are other flakes you use within your own flake, dependencies
# for your flake, etc.
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/home.nix'.
# Home manager
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Disko
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Flake utils for eachSystem
flake-utils.url = "github:numtide/flake-utils";
# Secrets management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Orzklv's Nix configuration
orzklv = {
url = "github:orzklv/nix/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Main homepage website
gate.url = "github:kolyma-labs/gate";
# Khakimov's website
khakimovs.url = "github:khakimovs/website";
# Xinux Bot from Xinux Community
xinux.url = "github:xinux-org/telegram";
# Rustina from Rust Uzbekistan
rustina.url = "github:rust-lang-uz/telegram";
# Minecraft server
minecraft = {
url = "github:Infinidoge/nix-minecraft";
};
};
# In this context, outputs are mostly about getting home-manager what it
# needs since it will be the one using the flake
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
flake-utils,
orzklv,
gate,
khakimovs,
xinux,
minecraft,
...
} @ inputs: let
# Self instance pointer
outputs = self;
in
# Attributes for each system
flake-utils.lib.eachDefaultSystem (
system: let
# Packages for the current <arch>
pkgs = nixpkgs.legacyPackages.${system};
in
# Nixpkgs packages for the current system
{
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = import ./pkgs {inherit pkgs;};
# Development shells
devShells.default = import ./shell.nix {inherit pkgs;};
}
)
# and ...
//
# Attribute from static evaluation
{
# Nixpkgs and Home-Manager helpful functions
lib = nixpkgs.lib // home-manager.lib // orzklv.lib;
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = orzklv.formatter;
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = self.lib.config.mapSystem {
inherit inputs outputs;
opath = ./.;
list = [
"Kolyma-1"
"Kolyma-2"
];
};
};
}