Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
81 lines (74 loc) · 2.16 KB
/
Copy pathflake.nix
File metadata and controls
81 lines (74 loc) · 2.16 KB
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
{
description = "Hardware Implementations";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
nix-devshells.url = "github:kleinbem/nix-devshells";
nix-devshells.inputs.nixpkgs.follows = "nixpkgs";
jetpack-nixos.url = "github:anduril/jetpack-nixos";
nixos-hardware.url = "github:NixOS/nixos-hardware";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [ ];
perSystem =
{
config,
pkgs,
system,
...
}:
{
formatter = inputs.nix-devshells.formatter.${system};
# Pre-commit checks
checks.pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
statix.enable = true;
deadnix.enable = true;
};
};
# DevShell
devShells.default = pkgs.mkShell {
shellHook = ''
${config.checks.pre-commit-check.shellHook}
echo "🔧 Hardware Flake DevEnv"
'';
buildInputs = [
pkgs.nixfmt
pkgs.statix
pkgs.deadnix
];
};
};
flake = {
nixosModules = {
nixos-nvme = import ./nixos-nvme.nix;
intel-compute = import ./intel-compute.nix;
rpi5 = {
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-5
(import ./rpi5.nix { inherit (inputs) nixos-hardware; })
];
};
orin-nano = {
imports = [
inputs.jetpack-nixos.nixosModules.default
./orin-nano.nix
];
};
lxc-guest = import ./lxc-guest.nix;
};
};
};
}