-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
90 lines (78 loc) · 1.92 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
{
description = "snow-blower";
inputs = {
# global, so they can be `.follow`ed
systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
flake-root.url = "github:srid/flake-root";
nixago = {
url = "github:nix-community/nixago";
inputs.nixpkgs.follows = "nixpkgs";
};
git-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
agenix.url = "github:ryantm/agenix";
};
outputs = inputs @ {
self,
flake-parts,
...
}: let
coreInputs =
inputs
// {
src = ./.;
};
src = ./.;
bootstrap =
inputs.flake-parts.lib.mkFlake {
inherit inputs self;
moduleLocation = ./flake.nix;
} ({...}: {
imports = [
{
_module.args = {
inherit src;
};
}
./modules
./modules/options-document.nix
];
debug = true;
systems = import inputs.systems;
});
mkSnowBlower = import ./mkSnowBlower.nix {inherit coreInputs;};
in
inputs.flake-parts.lib.mkFlake {inherit inputs;} ({...}: {
imports = [
bootstrap.flakeModules.default
bootstrap.flakeModules.optionsDocument
];
flake =
bootstrap
// {
templates = let
base = {
path = ./templates/flake-parts;
description = "The base snow blower flake.";
};
in {
inherit base;
default = base;
};
}
// {
inherit mkSnowBlower;
};
});
}