{ description = "straight up nixing it"; inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; deploy-rs.url = "github:serokell/deploy-rs"; agenix.url = "github:ryantm/agenix"; }; outputs = inputs@{ flake-parts, self, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; perSystem = { config, self', inputs', pkgs, system, ... }: { devShells.default = pkgs.mkShell { packages = with pkgs; [ deploy-rs inputs'.agenix.packages.default ]; }; }; flake = { nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./config/nixos.nix ./secrets inputs.agenix.nixosModules.default ]; }; deploy.nodes.nixos = { hostname = "nixos.cluster"; profiles.system = { sshUser = "root"; path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.nixos; }; }; # This is highly advised, and will prevent many possible mistakes checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib; }; }; }