{ description = "Private Void system configurations"; nixConfig = { allow-import-from-derivation = true; extra-substituters = "https://cache.privatevoid.net"; extra-trusted-public-keys = "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="; }; outputs = { self, nixpkgs, flake-parts, ... }@inputs: let systems = [ "x86_64-linux" "aarch64-linux" ]; forSystems = nixpkgs.lib.genAttrs systems; nixpkgsFor = nixpkgs.legacyPackages; inherit (nixpkgs) lib; aspect = import ./modules inputs; hosts = import ./hosts; nixosHosts' = lib.filterAttrs (_: host: host ? nixos) hosts; nixosHosts = lib.attrNames nixosHosts'; deployableNixosHosts' = lib.filterAttrs (_: host: host ? container -> !host.container) nixosHosts'; deployableNixosHosts = lib.attrNames deployableNixosHosts'; meta = import ./tools/meta.nix; specialArgs = { inherit inputs hosts aspect; toolsets = import ./tools; }; mkNixOS' = lib: name: let host = hosts.${name}; in lib.nixosSystem { inherit specialArgs; system = "${host.arch}-linux"; modules = [ host.nixos ./tools/inject.nix (import ./cluster/inject.nix name) ]; }; mkNixOS = mkNixOS' lib; mkDeployEffect = branch: name: host: let subdomain = host.enterprise.subdomain or "services"; hostname = "${lib.toLower name}.${subdomain}.${meta.domain}"; in effects.runIf (branch == "master" || branch == "staging") (effects.runNixOS { requiredSystemFeatures = [ "hci-deploy-agent-nixos" ]; inherit (self.nixosConfigurations.${name}) config; secretsMap.ssh = "deploy-ssh"; userSetupScript = '' writeSSHKey ssh cat >>~/.ssh/known_hosts <