/
flake.nix
97 lines (85 loc) · 2.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
{
description = "The Hive - The secretly open NixOS-Society";
inputs.std.url = "github:divnix/std";
inputs.std.inputs.nixpkgs.follows = "nixpkgs";
inputs.std.inputs.mdbook-kroki-preprocessor.follows = "std/blank";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# tools
inputs = {
nixos-generators.url = "github:blaggacao/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
nixos-generators.inputs.nixlib.follows = "nixpkgs";
colmena.url = "github:zhaofengli/colmena";
colmena.inputs.nixpkgs.follows = "nixpkgs";
colmena.inputs.stable.follows = "std/blank";
colmena.inputs.flake-utils.follows = "std/flake-utils";
};
# nixpkgs & home-manager
inputs = {
nixos.follows = "nixos-22-05";
home.follows = "home-22-05";
nixos-22-05.url = "github:nixos/nixpkgs/release-22.05";
home-22-05.url = "github:nix-community/home-manager/release-22.05";
nixos-21-11.url = "github:nixos/nixpkgs/release-21.11";
home-21-11.url = "github:blaggacao/home-manager/release-21.11-with-nix-profile";
};
outputs = {
std,
self,
...
} @ inputs:
std.growOn {
inherit inputs;
cellsFrom = ./comb;
# debug = ["cells" "x86_64-linux"];
cellBlocks = with std.blockTypes; [
# modules implement
(functions "nixosModules")
(functions "homeModules")
(functions "devshellModules")
# profiles activate
(functions "nixosProfiles")
(functions "homeProfiles")
(functions "devshellProfiles")
# suites aggregate profiles
(functions "nixosSuites")
(functions "homeSuites")
# configurations can be deployed
(data "nixosConfigurations")
(data "colmenaConfigurations")
(data "homeConfigurations")
# devshells can be entered
(devshells "devshells")
# jobs can be run
(runnables "jobs")
# library holds shared knowledge made code
(functions "library")
];
}
# soil
{
# tool: colmena -- "fill the jar on the soil with the honey!"
colmenaHive = let
makeHoneyFrom = import ./make-honey.nix {
inherit (inputs) colmena nixpkgs;
cellBlock = "colmenaConfigurations";
};
in
makeHoneyFrom self;
# tool: nixos-generators -- "get drunk like a bear!"
nixosConfigurations = let
makeMeadFrom = import ./make-mead.nix {
inherit (inputs) nixpkgs;
cellBlock = "nixosConfigurations";
};
in
makeMeadFrom self;
};
# --- Flake Local Nix Configuration ----------------------------
# TODO: adopt spongix
nixConfig = {
extra-substituters = [];
extra-trusted-public-keys = [];
};
# --------------------------------------------------------------
}