-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
33 lines (28 loc) · 1000 Bytes
/
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/x86_64-linux";
};
outputs = inputs @ { self, nixpkgs, flake-parts, systems }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
flake = {
overlays.default = import ./src/overlay.nix inputs;
};
perSystem = { self', config, pkgs, system, lib, ... }: {
_module.args.pkgs = import self.inputs.nixpkgs {
inherit system;
overlays = [
self.overlays.default
];
};
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
packages = [ pkgs.go pkgs.actionlint pkgs.yamlfmt ];
};
packages = lib.filterAttrs (n: v: lib.isDerivation v) (self.overlays.default null pkgs);
apps = lib.mapAttrs (n: v: { type = "app"; program = v; }) self'.packages;
};
};
}