blob: 52256497fb67b3b0218e46a6a5b72a3b30f0cd61 (
plain)
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
|
{
description = "Turris flake";
outputs = { self, flake-utils, nixpkgs }:
with flake-utils.lib;
let
supportedHostSystems = (
# Note: crossTarball* targets are broken on darwin so it gets disabled here
with builtins; filter (system: match ".*-darwin" system == null) defaultSystems
) ++ [system.armv7l-linux];
in {
overlays.default = final: prev: import ./pkgs { nixpkgs = prev; };
nixosModules = import ./nixos self;
lib = import ./lib self;
nixosConfigurations = {
tarballMox = self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs; };
tarballOmnia = self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs; };
};
} // eachSystem supportedHostSystems (
system: {
packages = let
tarball = nixos: nixos.config.system.build.tarball;
in {
tarballMox = tarball self.nixosConfigurations.tarballMox;
tarballOmnia = tarball self.nixosConfigurations.tarballOmnia;
crossTarballMox = tarball (self.lib.nixturrisTarballSystem { board = "mox"; nixpkgs = nixpkgs; system = system; });
crossTarballOmnia = tarball (self.lib.nixturrisTarballSystem { board = "omnia"; nixpkgs = nixpkgs; system = system; });
} // filterPackages system (flattenTree (
import ./pkgs { nixpkgs = nixpkgs.legacyPackages."${system}"; }
));
# The legacyPackages imported as overlay allows us to use pkgsCross to
# cross-compile those packages.
legacyPackages = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
crossOverlays = [ self.overlays.default ];
};
}
);
}
|