2022-12-09 16:04:16 +03:00
|
|
|
{
|
|
|
|
description = "A universal nixos installer, just needs ssh access to the target system";
|
|
|
|
|
2023-01-11 00:02:22 +03:00
|
|
|
inputs = {
|
2023-01-22 11:41:27 +03:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
2023-01-11 00:02:22 +03:00
|
|
|
flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; };
|
2023-09-17 11:03:17 +03:00
|
|
|
|
2023-01-11 00:02:22 +03:00
|
|
|
# used for testing
|
2023-09-17 11:03:17 +03:00
|
|
|
disko = { url = "github:nix-community/disko/master"; inputs.nixpkgs.follows = "nixpkgs"; };
|
2023-12-12 17:27:17 +03:00
|
|
|
nixos-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
2023-01-11 00:02:22 +03:00
|
|
|
nixos-images.url = "github:nix-community/nixos-images";
|
2023-05-07 21:20:49 +03:00
|
|
|
nixos-images.inputs.nixos-unstable.follows = "nixpkgs";
|
2023-12-12 17:27:17 +03:00
|
|
|
nixos-images.inputs.nixos-2311.follows = "nixos-stable";
|
2023-09-17 11:03:17 +03:00
|
|
|
|
2023-01-12 05:34:12 +03:00
|
|
|
# used for development
|
2023-05-07 21:20:49 +03:00
|
|
|
treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
2023-01-11 00:02:22 +03:00
|
|
|
};
|
2022-12-09 16:04:16 +03:00
|
|
|
|
2023-01-11 00:02:22 +03:00
|
|
|
|
|
|
|
outputs = inputs:
|
|
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
imports = [
|
|
|
|
./src/flake-module.nix
|
|
|
|
./tests/flake-module.nix
|
|
|
|
./docs/flake-module.nix
|
2023-09-17 11:03:17 +03:00
|
|
|
# allow to disable treefmt in downstream flakes
|
|
|
|
] ++ inputs.nixpkgs.lib.optional (inputs.treefmt-nix ? flakeModule) ./treefmt/flake-module.nix;
|
2023-01-12 05:34:12 +03:00
|
|
|
|
2023-08-28 17:20:37 +03:00
|
|
|
perSystem = { self', config, lib, ... }: {
|
|
|
|
checks =
|
|
|
|
let
|
|
|
|
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
|
|
|
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
|
|
|
in
|
|
|
|
packages // devShells;
|
2023-01-12 05:34:12 +03:00
|
|
|
};
|
2022-12-09 16:04:16 +03:00
|
|
|
};
|
|
|
|
}
|