git.delta.rocks / jrsonnet / refs/commits / cc4ecd613a27

difftreelog

source

modules/fleet/hosts.nix1.1 KiBsourcehistory
1{2  lib,3  fleetLib,4  ...5}: let6  inherit (fleetLib.modules) mkFleetGeneratorDefault;7  inherit (fleetLib.types) mkHostsType;8  inherit (lib.options) mkOption;9  inherit (lib.types) str listOf;10in {11  options = {12    hosts = mkOption {13      type = mkHostsType ({config, ...}: {14        options = {15          system = mkOption {16            type = str;17            description = "Type of the system.";18          };19          # TODO: This is part of fleet.nix, move it to separate toplevel data config option.20          encryptionKey = mkOption {21            type = str;22            description = "Rage SSH encryption key for secrets.";23          };24          tags = mkOption {25            type = listOf str;26            description = "Host tag. In CLI, you can refer to all hosts having this tag using @tag syntax.";27          };28        };29        config = {30          nixos.networking.hostName = mkFleetGeneratorDefault config._module.args.name;31          tags = ["all"];32        };33        _file = ./meta.nix;34      });35      default = {};36      description = "Configurations of individual hosts";37    };38  };39  _file = ./meta.nix;40}