git.delta.rocks / jrsonnet / refs/commits / 4daa40be7e69

difftreelog

source

modules/fleet/meta.nix928 Bsourcehistory
1{ lib, fleet, config, ... }: with lib;2let3  host = with types; {4    options = {5      modules = mkOption {6        type = listOf anything;7        description = "List of nixos modules";8        default = [ ];9      };10      system = mkOption {11        type = str;12        description = "Type of system";13      };14      encryptionKey = mkOption {15        type = str;16        description = "Encryption key";17      };18    };19  };20in21{22  options = with types; {23    hosts = mkOption {24      type = attrsOf (submodule host);25      default = { };26      description = "Configurations of individual hosts";27    };28    globalModules = mkOption {29      type = listOf anything;30      description = "Modules, which should be added to every system";31      default = [ ];32    };33  };34  config = {35    hosts = fleet.hostsToAttrs (host: {36      modules = config.globalModules;37    });38    globalModules = import ../nixos/_modules.nix;39  };40}