{ config, lib, ... }:
let
  cfg = config.khscodes.machine;
in
rec {
  options.khscodes.machine = {
    type = lib.mkOption {
      type = lib.types.enum [
        "server"
        "desktop"
      ];
      description = "The kind of machine that is running";
    };
  };
  config = {
    home-manager.sharedModules = [
      {
        inherit options;
        config = {
          khscodes.desktop.enable = cfg.type == "desktop";
        };
      }
    ];
  };
}
