-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (32 loc) · 965 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
34
35
36
{
description = "A tool to forge custom, isolated & mergeable environments";
nixConfig = {
extra-substituters = [
"https://cache.garnix.io"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs:
let
forEachSystem =
inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed;
in {
packages = forEachSystem (system:
let
imp = builtins.mapAttrs (_: input:
input.packages.${system} or input.legacyPackages.${system}) inputs;
in rec {
default = envil;
envil = imp.nixpkgs.writeShellApplication {
name = "envil";
runtimeInputs = with imp.nixpkgs; [nushell jsonschema nixfmt-classic];
text = ''nu -n ${./src}/envil "$@"'';
} ;
});
};
}