-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
67 lines (56 loc) · 2.04 KB
/
Copy pathflake.nix
File metadata and controls
67 lines (56 loc) · 2.04 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# https://lazamar.co.uk/nix-versions/?package=yarn&version=1.22.19&fullName=yarn-1.22.19&keyName=yarn&revision=336eda0d07dc5e2be1f923990ad9fdb6bc8e28e3&channel=nixpkgs-unstable#instructions
# nixpkgs-foo.url = "https://github.com/NixOS/nixpkgs/archive/336eda0d07dc5e2be1f923990ad9fdb6bc8e28e3.tar.gz";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = { };
systems = [
"aarch64-darwin"
"x86_64-linux"
];
# This is needed for pkgs-unstable - https://github.com/hercules-ci/flake-parts/discussions/105
imports = [ flake-parts.flakeModules.easyOverlay ];
perSystem = { system, ... }:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
# pkgs-foo = import nixpkgs-foo {
# inherit system;
# config.allowUnfree = true;
# };
ci_packages = {
# Nix
nix-fmt = pkgs.nixpkgs-fmt;
# General
inherit (pkgs-unstable) just; # need just >1.33 for working-directory setting
};
packages = (builtins.attrValues ci_packages) ++ [
pkgs.just
pkgs.statix
pkgs.nixpkgs-fmt
pkgs-unstable.nil
pkgs.hadolint
];
in
{
# This is needed for pkgs-unstable - https://github.com/hercules-ci/flake-parts/discussions/105
overlayAttrs = { inherit pkgs-unstable; };
formatter = pkgs.nixpkgs-fmt;
packages = ci_packages;
devShells.default = pkgs.mkShell {
inherit packages;
};
};
};
}