-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
flake.nix
88 lines (79 loc) · 2.28 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
{
inputs = {
devenv = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:cachix/devenv";
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:oxalica/rust-overlay";
};
crane.url = "github:ipetkov/crane";
pnpm2nix = {
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
url = "github:aumetra/pnpm2nix-nzbr";
};
# The premise is this is the "default" and if you want to do a debug build,
# pass it in as an arg.
# like so `nix build --override-input debugBuild github:boolean-option/true`
debugBuild.url = "github:boolean-option/false/d06b4794a134686c70a1325df88a6e6768c6b212";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs =
{ self
, crane
, devenv
, flake-utils
, nixpkgs
, pnpm2nix
, rust-overlay
, ...
}@inputs:
(
flake-utils.lib.eachDefaultSystem
(
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit overlays system; };
in
{
formatter = pkgs.nixpkgs-fmt;
packages = {
devenv-up = self.devShells.${system}.default.config.procfileScript;
} // (import ./nix/packages.nix) {
inherit crane pkgs;
debugBuild = inputs.debugBuild;
mkPnpmPackage = pnpm2nix.packages.${system}.mkPnpmPackage;
};
devShells = (import ./nix/devshells.nix) { inherit devenv pkgs inputs; };
}
)
// {
overlays = rec {
default = kitsune;
kitsune = (import ./nix/overlay.nix self);
};
nixosModules = rec {
default = kitsune;
kitsune = (import ./nix/module.nix);
};
}
)
// {
nixci.default = {
debug = {
dir = ".";
overrideInputs.debugBuild = "github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698";
};
};
};
}