-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
50 lines (47 loc) · 1.34 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
{
description = "A starting point for your devshell";
inputs = {
nixpkgs.follows = "lix/nixpkgs";
systems.url = "github:nix-systems/default";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/2.90-beta.1.tar.gz";
inputs.nixpkgs-regression.follows = "";
};
};
nixConfig = {
extra-substituters = [
"https://cache.lix.systems"
];
extra-trusted-public-keys = [
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
];
};
outputs = {
self,
nixpkgs,
systems,
lix,
}: let
lixImage = system: lix.packages.${system}.dockerImage;
allSystems = import systems;
forEachSystem = nixpkgs.lib.genAttrs allSystems;
nixpkgsFor = forEachSystem (system:
import nixpkgs {
inherit system;
overlays = [lix.overlays.default];
});
in {
# Nix code formatter; I like alejandra, but nixpkgsfmt, nixfmt-classic, and nixfmt-rfc-style also exist
formatter = forEachSystem (system: nixpkgsFor.${system}.alejandra);
# Packages exported by this flake
packages = forEachSystem (system: {
default = self.packages.${system}.lixImage;
lixImage = lixImage system;
});
devShells = forEachSystem (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShellNoCC {packages = [];};
});
};
}