Hack together a nixosConfigurations output
While the resulting configurations aren't buildable (missing settings from nixops state for fileSystems for example), it's enough to check settings using commands like: nix eval .#nixosConfigurations.eris.config.deployment.keys --json | jq
Linus Heckemann committed
Mar 4, 2023 at 02:09 UTC
a077c9d3958b12c2730d4950447852baefdf5280
1 file changed
+15
delft/flake.nix
+15
@@ -13,5 +13,20 @@
13
{ inherit nixpkgs; }
14
// import ./network.nix flakes;
15
16
+ nixosConfigurations = builtins.removeAttrs (lib.mapAttrs (name: value: nixpkgs.lib.nixosSystem {
17
+ system = "x86_64-linux";
18
+ modules = [
19
+ value
20
+ self.nixopsConfigurations.default.defaults
21
+ {
22
+ # hack: this doesn't check deployment options properly, but
23
+ # is enough to have the deployment options ignored and allow
24
+ # evaluating individual config options.
25
+ options.deployment = lib.mkOption {
26
+ type = (nixpkgs.legacyPackages.x86_64-linux.formats.json {}).type;
27
+ };
28
+ }
29
+ ];
30
+ }) self.nixopsConfigurations.default) ["defaults"];
31
};
32
}