NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.86k stars 365 forks source link

In NixOps 2, is it possible to use multi-file network definitions from NixOps 1? #1578

Open pvgoran opened 3 months ago

pvgoran commented 3 months ago

I'm currently using NixOps 1 on NixOS 23.05, and I'm considering if I can/should migrate to NixOps 2 (as part of NixOS upgrade).

As far as I understand, with NixOps 2 a network is defined from a single file: nixops.nix or flake.nix. I don't want to touch the "flake" approach because I don't understand flakes in general, and this approach is said to be experimental, so I'll assume using nixops.nix.

So, the question is: if I have a network definition for NixOps 1 split into two files (the "logical" part and the "physical" part, like, network.nix and network-physical.nix), can I write a nixops.nix file that would "import" these two files with NixOps 2, similar to how NixOps 1 does?