Open nh2 opened 7 years ago
I'm not following the question, this is part of NixOS module configuration which is modular and you can import it for each machine using the NixOS imports
directive like any other configuration. As per https://nixos.org/nixos/manual/#sec-customising-packages
What I mean is, currently each of my machines is a function of form { pkgs, config, ... }
.
For example:
{
network.enableRollback = true;
machine1 = { pkgs, config, ... }: {
...
}
machine2 = { pkgs, config, ... }: {
...
}
}
Currently if I want to override packages for all machines, I do nixpkgs.config.packageOverries = pkgs: { ... }
for each machine (or with some wrapper function to not repeat myself).
What I'm wondering is: Can I override the nixpkgs globally / at the network level, so that the pkgs
passed to each machine already contains my overridden package set?
So the question you are really asking: Can I tell nixops to apply a NixOS module to all machines? I don't think we support that currently. We could have something like network.imports
for such purposes.
EDIT: closed the issue by mistake
You can do this with defaults: https://github.com/NixOS/nixops/commit/84b9518f88fd7744a2ea38af9ec769b8291c48f6#diff-bca12c48d3713afd322ee4022b4f2e2eR1718
Is there a way to specify
nixpkgs.packageOverrides
for the entire fleet (network)?I can't figure out from the documentation how to do that.