74 lines
1.9 KiB
Nix
74 lines
1.9 KiB
Nix
{
|
|
description = "The Co-op Cloud utility belt";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
microvm = {
|
|
url = "github:astro/microvm.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
microvm,
|
|
home-manager,
|
|
flake-utils,
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
publicKey = builtins.readFile ./test-integration.pub;
|
|
privateKey = builtins.readFile ./test-integration;
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
abra-client = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
microvm.nixosModules.microvm
|
|
home-manager.nixosModules.home-manager
|
|
./nix/hosts/client/configuration.nix
|
|
];
|
|
specialArgs = { inherit publicKey privateKey; };
|
|
};
|
|
abra-server = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
microvm.nixosModules.microvm
|
|
./nix/hosts/server/configuration.nix
|
|
];
|
|
specialArgs = { inherit publicKey privateKey; };
|
|
};
|
|
};
|
|
packages = rec {
|
|
abra = pkgs.callPackage ./package.nix { };
|
|
default = abra;
|
|
};
|
|
apps = rec {
|
|
abra = flake-utils.lib.mkApp { drv = self.packages.${system}.abra; };
|
|
default = abra;
|
|
};
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
# testing env variables
|
|
BATS_LIB_PATH = "~/.local/share/bats/";
|
|
TEST_SERVER = "abra.local";
|
|
ABRA_DIR = "$HOME/.abra_test";
|
|
|
|
packages = with pkgs; [
|
|
go_1_26
|
|
gnumake
|
|
gopls
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|