alyraffauf/nynx
{ "createdAt": "2025-07-10T01:23:07Z", "defaultBranch": "master", "description": "A Flake-native deployment tool using nix-eval-jobs for distributed NixOS and Darwin clusters.", "fullName": "alyraffauf/nynx", "homepage": "", "language": "Go", "name": "nynx", "pushedAt": "2025-11-09T14:49:14Z", "stargazersCount": 6, "topics": [ "automation", "deployment", "flake", "golang", "nix", "nix-darwin", "nixos" ], "updatedAt": "2025-11-09T14:49:17Z", "url": "https://github.com/alyraffauf/nynx"}nynx (nix+sync)
Section titled “nynx (nix+sync)”A Flake deployer for distributed NixOS and Darwin clusters. Useful for quickly deploying the same flake revision to multiple machines in parallel.
Mainly a personal project to serve some specific needs of mine (outlined here), but it may be helpful to others as well. Also, it’s my first time writing Go (please be gentle).
Build the tool using Nix:
nix build .#nynxRun deployments:
nix run .#nynx -- --flake <flake-url> --operation <operation>--debug: Enable debug output.--skip: Skip a comma-separated subset of jobs.--jobs: Comma-separated subset of jobs to run (default: all jobs).--flake: Specify the flake path or URL (e.g.,github:alyraffauf/nixcfg).--build-host: Specify the host on which to build closures (default:localhost).--operation: Operation to perform (switch, oractivatefor Darwin;boot,test,switchfor NixOS).
Example
Section titled “Example”Deploy a flake to all jobs defined in deployments.nix:
nix run .#nynx -- --flake github:alyraffauf/nixcfg --operation switchRun specific deployment jobs:
nix run .#nynx -- --flake github:alyraffauf/nixcfg --operation switch --jobs server,workstationSample #nynxDeployments
Section titled “Sample #nynxDeployments”Nynx is configured with a Flake output containing an attrset that defines a set of deployment jobs. Outputs can be declared in the same Flake or in an upstream Flake.
{ nynxDeployments = { evergrande = { hostname = "evergrande"; # Will be assumed from deployment name if not specified. output = self.inputs.nixcfg.nixosConfigurations.evergrande.config.system.build.toplevel; type = "nixos"; user = "root"; };
fortree = { output = self.darwinConfigurations.fortree.config.system.build.toplevel; user = "aly"; type = "darwin"; }; };}Limitations
Section titled “Limitations”- Requires SSH root access or the ability to escalate privileges with sudo without password entry. It won’t prompt for a password, it just fails.
- Does not (yet) support other forms of Nix profiles, such as home-manager.
License
Section titled “License”This project is licensed under the GNU General Public License v3.0.
Contribution
Section titled “Contribution”Contributions are welcome! Please open issues or submit pull requests for any improvements you make or bugs you encounter.
Contact
Section titled “Contact”You can reach me at aly @ aly dot codes.