{ description = "The Co-op Cloud utility belt"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; microvm = { url = "github:astro/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, microvm, flake-utils, }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; publicKey = builtins.readFile ./tests/resources/local_integration_ssh.pub; privateKey = builtins.readFile ./tests/resources/local_integration_ssh; pathToRepo = builtins.readFile ./tests/resources/path_to_repo; # local DNS aliases for the server host extraHosts = builtins.readFile ./tests/resources/extra_hosts; username = "abra"; password = "abra"; defaultDNS = [ # Quad9.net "9.9.9.9" "149.112.112.112" "2620:fe::fe" "2620:fe::9" ]; in { nixosConfigurations = { abra-client = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ microvm.nixosModules.microvm ./nix/hosts/client/configuration.nix ]; specialArgs = { inherit publicKey privateKey username password defaultDNS extraHosts pathToRepo ; }; }; abra-server = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ microvm.nixosModules.microvm ./nix/hosts/server/configuration.nix ]; specialArgs = { inherit publicKey privateKey username password defaultDNS ; }; }; }; nixosModules = rec { host = { imports = [ microvm.nixosModules.host ./nix/modules/host.nix ]; }; default = host; }; packages = rec { abra = pkgs.callPackage ./nix/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 gettext ]; }; }; }