-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
39 lines (37 loc) · 1.37 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
{
description = "A very basic flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
nixpkgs.url = "github:nixos/nixpkgs/23.11";
nur-kapack.url = "github:oar-team/nur-kapack";
nur-kapack.inputs."nixpkgs".follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, pre-commit-hooks, nur-kapack }:
let templates = import ./templates/nix_flake_templates.nix;
in flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" ] (system:
let
pkgs = import nixpkgs { inherit system; };
shellSet = import ./shells/default.nix { inherit pkgs; };
kapack = nur-kapack.packages.${system};
in rec {
packages = (import ./pkgs/packages.nix { inherit pkgs kapack; });
checks = {
#pre-commit-check = pre-commit-hooks.lib.${system}.run {
# src = ./.;
# hooks = {
# nixfmt = { enable = true; };
# nix-linter = { enable = true; };
# };
#};
};
devShells = {
#check = nixpkgs.legacyPackages.${system}.mkShell {
# inherit (self.checks.${system}.pre-commit-check) shellHook;
#};
} // shellSet;
}) // {
inherit templates;
overlay = final: prev: import ./pkgs/packages.nix { pkgs = prev; };
};
}