-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathflake.nix
54 lines (49 loc) · 1.24 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
{
inputs = {
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
systems = {
type = "github";
owner = "nix-systems";
repo = "default";
};
};
outputs =
{
self,
nixpkgs,
systems,
...
}:
let
inherit (nixpkgs) lib;
eachSystem = f: lib.genAttrs (import systems) (s: f nixpkgs.legacyPackages.${s});
in
{
lib = import ./lib lib;
legacyPackages = eachSystem (
pkgs:
import ./pkgs {
inherit pkgs;
unfreePkgs = import nixpkgs {
inherit (pkgs.stdenv) system;
config.allowUnfreePredicate = pkg: (lib.getName pkg == "spotify");
};
docsVersion = self.rev or self.dirtyRev or "dirty";
}
);
formatter = eachSystem (pkgs: pkgs.nixfmt-rfc-style);
devShells = eachSystem (pkgs: {
default = pkgs.mkShellNoCC { packages = [ pkgs.npins ]; };
fetcher = pkgs.mkShell {
packages = builtins.attrValues { inherit (pkgs) rust-analyzer clippy rustfmt; };
inputsFrom = [ self.legacyPackages.${pkgs.stdenv.system}.fetcher ];
};
});
}
// import ./modules;
}