git.delta.rocks / jrsonnet / refs/commits / 8fb243b6f0b6

difftreelog

source

modules/nixpkgs.nix1.5 KiBsourcehistory
1{2  lib,3  fleetLib,4  config,5  ...6}: let7  inherit (lib.options) mkOption;8  inherit (lib.types) path;9  inherit (lib.modules) mkRemovedOptionModule;10  inherit (fleetLib.options) mkHostsOption;11  inherit (fleetLib.types) listOfOverlay;1213  _file = ./nixpkgs.lib;14in {15  options = {16    nixpkgs = {17      buildUsing = mkOption {18        description = ''19          Default nixpkgs to use for building the systems.20        '';21        type = path;22      };23      overlays = mkOption {24        description = ''25          Package overlays to apply for all the hosts, gets propagated into26          `hosts.*.nixosModules.nixpkgs.overlays`.27        '';28        type = listOfOverlay;29      };30    };31    hosts = mkHostsOption {32      inherit _file;33      options.nixpkgs.buildUsing = mkOption {34        description = ''35          Nixpkgs to use for building the system.3637          Note that this option is defined at the host level, not the nixosModules level,38          nixosModules will be evaluated using this flake input.39        '';40        type = path;41        default = config.nixpkgs.buildUsing;42      };43      # imports = [44      # 	(mkRemovedOptionModule ["nixpkgs" "overlays"] "this option needs to be specified at nixosModules level")45      # ];46      config.nixos = {47        inherit _file;48        nixpkgs.overlays = config.nixpkgs.overlays;49        imports = [50          (mkRemovedOptionModule ["nixpkgs" "buildUsing"] "this option should be specified at the host level, not the nixosModules level")51        ];52      };53    };54  };55}