nixos-anywhere/flake.nix

44 lines
1.4 KiB
Nix
Raw Normal View History

2022-12-09 16:04:16 +03:00
{
description = "A universal nixos installer, just needs ssh access to the target system";
2022-12-09 16:56:06 +03:00
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2022-12-09 16:04:16 +03:00
inputs.disko.url = "github:nix-community/disko/master";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
2022-12-23 13:20:55 +03:00
# used for testing
inputs.nixos-images.url = "github:nix-community/nixos-images";
2022-12-09 16:04:16 +03:00
2022-12-23 13:20:55 +03:00
outputs = { self, disko, nixpkgs, nixos-images, ... }:
2022-12-21 21:34:34 +03:00
let
supportedSystems = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
default = self.packages.${system}.nixos-remote;
docs = pkgs.callPackage ./docs { };
nixos-remote = pkgs.callPackage ./nixos-remote.nix { };
});
checks.x86_64-linux =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{
from-nixos = import ./tests/from-nixos.nix {
inherit pkgs;
disko = disko.nixosModules.disko;
2022-12-23 13:20:55 +03:00
kexec-installer = nixos-images.packages.${pkgs.system}.kexec-installer-nixos-unstable;
2022-12-21 21:34:34 +03:00
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
};
};
2022-12-09 16:04:16 +03:00
};
}