Skip to content

Commit d8d77b8

Browse files
committed
feat: default for nixpkgs.buildUsing
1 parent 8fb243b commit d8d77b8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.adoc

-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ An NixOS cluster deployment tool.
4747
4848
# Single flake may contain multiple fleet configurations, default one is called... `default`
4949
fleetConfigurations.default = {
50-
# nixpkgs used to build the systems
51-
nixpkgs.buildUsing = inputs.nixpkgs;
52-
5350
# nixos option section of fleet config declares module, which is used for all configured nixos hosts.
5451
nixos = {
5552
imports = [inputs.lanzaboote.nixosModules.lanzaboote];

lib/flakePart.nix

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
inherit (lib.attrsets) mapAttrs;
1111
inherit (lib.types) lazyAttrsOf deferredModule unspecified str;
1212
inherit (lib.strings) isPath;
13-
inherit (lib.modules) mkIf;
13+
inherit (lib.modules) mkIf mkOptionDefault;
1414
in {
1515
options.fleetModules = mkOption {
1616
type = lazyAttrsOf unspecified;
@@ -44,7 +44,10 @@ in {
4444
Nixpkgs to use for fleetConfiguration evaluation.
4545
'';
4646
};
47-
config._module.check = false;
47+
config = {
48+
_module.check = false;
49+
nixpkgs.buildUsing = mkOptionDefault inputs.nixpkgs;
50+
};
4851
}
4952
];
5053
};
@@ -60,6 +63,7 @@ in {
6063
if isPath data
6164
then import data
6265
else data;
66+
nixpkgs.buildUsing = mkOptionDefault bootstrapNixpkgs;
6367
nixpkgs.overlays = [
6468
(final: prev:
6569
import ../pkgs {

0 commit comments

Comments
 (0)