-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
31 lines (30 loc) · 918 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
# Minimal flake layer to support nix-shell and devenv
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-root.url = "github:srid/flake-root";
devenv = {
url = "github:cachix/devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
inputs.flake-root.flakeModule
];
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { config, self', inputs', pkgs, system, lib, ... }:
let
localPkgs = import ./.nix/packages { inherit pkgs lib; };
rootDir = lib.getExe config.flake-root.package;
in
{
devenv.shells.default =
(import ./devenv.nix {
inherit inputs pkgs lib rootDir localPkgs;
});
};
};
}