-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
96 lines (82 loc) · 2.35 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
{
description = "NAHO's NixOS Flake";
inputs = {
agenix = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:ryantm/agenix";
};
disko = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/disko";
};
disks = {
inputs = {
disko.follows = "disko";
flakeUtils.follows = "flakeUtils";
nixpkgs.follows = "nixpkgs";
preCommitHooks.follows = "preCommitHooks";
};
url = "github:trueNAHO/disks";
};
flakeUtils.url = "github:numtide/flake-utils";
impermanence.url = "github:nix-community/impermanence";
nixosHardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
preCommitHooks = {
inputs = {
flake-utils.follows = "flakeUtils";
nixpkgs-stable.follows = "preCommitHooks/nixpkgs";
nixpkgs.follows = "nixpkgs";
};
url = "github:cachix/pre-commit-hooks.nix";
};
};
outputs = {
self,
disks,
flakeUtils,
nixpkgs,
preCommitHooks,
...
} @ inputs:
flakeUtils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
checks =
(
pkgs.lib.attrsets.concatMapAttrs
(k: v: {"${k}Package" = v;})
inputs.self.packages.${system}
)
// {
nixosConfigurationsBluetop =
self.nixosConfigurations.bluetop.config.system.build.toplevel;
nixosConfigurationsMasterplan =
self.nixosConfigurations.masterplan.config.system.build.toplevel;
preCommitHooks = preCommitHooks.lib.${system}.run {
hooks = {
alejandra.enable = true;
convco.enable = true;
typos.enable = true;
yamllint.enable = true;
};
settings = {
alejandra.verbosity = "quiet";
typos.exclude = "*.age";
};
src = ./.;
};
};
devShells.default = pkgs.mkShell {
inherit (self.checks.${system}.preCommitHooks) shellHook;
};
packages = {
inherit (disks.packages.${system}) disko format mount shred;
};
}
)
// {
nixosConfigurations = import ./hosts {inherit inputs;};
};
}