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;
|
2022-12-30 19:19:35 +03:00
|
|
|
inputs = {
|
2022-12-21 21:34:34 +03:00
|
|
|
inherit pkgs;
|
2022-12-30 19:19:35 +03:00
|
|
|
inherit (disko.nixosModules) disko;
|
2022-12-24 23:27:07 +03:00
|
|
|
kexec-installer = "${nixos-images.packages.${pkgs.system}.kexec-installer-nixos-unstable}/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz";
|
2022-12-21 21:34:34 +03:00
|
|
|
};
|
2022-12-30 19:19:35 +03:00
|
|
|
in
|
|
|
|
{
|
|
|
|
from-nixos = import ./tests/from-nixos.nix inputs;
|
2022-12-30 20:51:46 +03:00
|
|
|
from-nixos-with-sudo = import ./tests/from-nixos-with-sudo.nix inputs;
|
2022-12-21 21:34:34 +03:00
|
|
|
};
|
2022-12-09 16:04:16 +03:00
|
|
|
};
|
|
|
|
}
|