jade
efbb3769cb
• Updated input 'lix': 'bcaeb6388b
.tar.gz?narHash=sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s%3D&rev=bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2' (2024-08-12) → 'ad9d06f783
.tar.gz?narHash=sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U%3D&rev=ad9d06f7838a25beec425ff406fe68721fef73be' (2024-10-19)
67 lines
2.1 KiB
Nix
67 lines
2.1 KiB
Nix
{
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
inputs.lix = {
|
|
url = "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz";
|
|
flake = false;
|
|
};
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
inputs.flakey-profile.url = "github:lf-/flakey-profile";
|
|
|
|
outputs = inputs@{ self, nixpkgs, lix, flake-utils, flakey-profile, ... }:
|
|
let
|
|
lixVersionJson = builtins.fromJSON (builtins.readFile (lix + "/version.json"));
|
|
versionSuffix = nixpkgs.lib.optionalString (!lixVersionJson.official_release)
|
|
"-pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev or lix.dirtyShortRev}";
|
|
in
|
|
{
|
|
inherit inputs;
|
|
nixosModules = {
|
|
# Use a locally built Lix
|
|
default = import ./module.nix { inherit lix versionSuffix; };
|
|
|
|
# Use Lix from nixpkgs
|
|
lixFromNixpkgs = import ./module.nix { lix = null; };
|
|
};
|
|
|
|
overlays = {
|
|
# Use a locally built Lix
|
|
default = import ./overlay.nix { inherit lix versionSuffix; };
|
|
|
|
# Use Lix from nixpkgs
|
|
lixFromNixpkgs = import ./overlay.nix { lix = null; };
|
|
};
|
|
} // flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlays.default ];
|
|
};
|
|
|
|
linux64BitSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
|
|
inherit (pkgs) lib;
|
|
in
|
|
{
|
|
inherit pkgs;
|
|
packages = {
|
|
default = pkgs.nix;
|
|
inherit (pkgs) nix-doc nix-eval-jobs;
|
|
};
|
|
|
|
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
|
|
|
|
nixosTests = pkgs.recurseIntoAttrs (pkgs.callPackage ./test-nixos.nix { inherit pkgs; lix-module = self.nixosModules.default; });
|
|
|
|
checks = {
|
|
inherit (self.packages.${system}) default nix-eval-jobs;
|
|
inherit (pkgs) nixos-option;
|
|
} // lib.optionalAttrs (lib.elem system linux64BitSystems) {
|
|
# wrongMajor intentionally not included here since it is expected to fail
|
|
inherit (self.nixosTests.${system}) it-builds;
|
|
};
|
|
});
|
|
}
|