1{2 lib,3 fleetLib,4 config,5 ...6}:7let8 inherit (lib.options) mkOption literalExpression;9 inherit (lib.types) path;10 inherit (fleetLib.options) mkHostsOption;11 inherit (fleetLib.types) listOfOverlay;1213 _file = ./nixpkgs.lib;14in15{16 options = {17 nixpkgs = {18 buildUsing = mkOption {19 description = ''20 Default nixpkgs to use for building the systems.21 '';22 type = path;23 };24 overlays = mkOption {25 description = ''26 Package overlays to apply for all the hosts, gets propagated into27 `hosts.*.nixosModules.nixpkgs.overlays`.28 '';29 type = listOfOverlay;30 };31 };32 hosts = mkHostsOption {33 inherit _file;34 options.nixpkgs.buildUsing = mkOption {35 description = ''36 Nixpkgs to use for building the system.3738 Note that this option is defined at the host level, not the nixosModules level,39 nixosModules will be evaluated using this flake input.40 '';41 type = path;42 default = config.nixpkgs.buildUsing;43 defaultText = literalExpression "config.nixpkgs.buildUsing";44 };45 config.nixos = {46 inherit _file;47 nixpkgs.overlays = config.nixpkgs.overlays;48 };49 };50 };51}