-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
106 lines (99 loc) · 2.89 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
{
description = "somewhat somehow deterministic";
inputs = {
colmena = {
inputs = {
nixpkgs.follows = "nixpkgs";
stable.follows = "nixpkgs";
};
url = "github:zhaofengli/colmena";
};
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
hyprland = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:hyprwm/Hyprland";
};
impermanence.url = "github:nix-community/impermanence";
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
nix-vscode-extensions = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-vscode-extensions";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
sops-nix = {
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
url = "github:Mic92/sops-nix";
};
};
outputs =
inputs@{ nixpkgs, self, ... }:
{
colmena =
{
meta = {
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
};
}
// builtins.mapAttrs
(_: v: {
imports = v._module.args.modules;
nixpkgs.system = v.config.nixpkgs.system;
})
(
nixpkgs.lib.filterAttrs (
_: v: (builtins.elem "server" v.config.deployment.tags)
) self.nixosConfigurations
);
colmenaHive = inputs.colmena.lib.makeHive self.outputs.colmena;
nixosConfigurations = {
laptop0 = import ./nixos/laptop0 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
laptop1 = import ./nixos/laptop1 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
lax0 = import ./nixos/lax0 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
nas = import ./nixos/nas {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
nrt0 = import ./nixos/nrt0 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
nrt1 = import ./nixos/nrt1 {
system = "aarch64-linux";
inherit self nixpkgs inputs;
};
nrt2 = import ./nixos/nrt2 {
system = "aarch64-linux";
inherit self nixpkgs inputs;
};
sha0 = import ./nixos/sha0 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
sxb0 = import ./nixos/sxb0 {
system = "x86_64-linux";
inherit self nixpkgs inputs;
};
};
homeModules = import ./modules/home;
nixosModules = import ./modules/nixos;
};
}