2024-03-23 02:43:56 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-03-24 03:30:47 +00:00
|
|
|
microvm = {
|
|
|
|
url = "github:astro/microvm.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-03-23 02:43:56 +00:00
|
|
|
};
|
|
|
|
|
2024-03-24 03:30:47 +00:00
|
|
|
outputs = { self, nixpkgs, flake-utils, microvm }:
|
2024-03-23 02:43:56 +00:00
|
|
|
let
|
|
|
|
out = system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [ self.overlays.default ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-03-24 03:30:47 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2024-03-23 02:43:56 +00:00
|
|
|
jdk
|
|
|
|
zlib
|
|
|
|
maven
|
2024-03-24 03:30:47 +00:00
|
|
|
nixos-rebuild
|
|
|
|
];
|
2024-03-23 03:09:22 +00:00
|
|
|
};
|
2024-03-24 03:30:47 +00:00
|
|
|
|
|
|
|
packages.default = pkgs.callPackage ./package.nix { };
|
|
|
|
packages.run = self.nixosConfigurations.test.config.microvm.declaredRunner;
|
2024-03-23 02:43:56 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
flake-utils.lib.eachDefaultSystem out // {
|
2024-03-24 03:30:47 +00:00
|
|
|
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
({ ... }: {
|
|
|
|
services.keycloak.plugins = [ self.packages.x86_64-linux.default ];
|
|
|
|
})
|
|
|
|
./test-nixos.nix
|
|
|
|
microvm.nixosModules.microvm
|
|
|
|
];
|
2024-03-23 02:43:56 +00:00
|
|
|
};
|
2024-03-24 03:30:47 +00:00
|
|
|
|
|
|
|
overlays.default = final: prev: { };
|
2024-03-23 02:43:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|